mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
ci fixes
This commit is contained in:
parent
ba64379348
commit
f97e7392a3
2 changed files with 11 additions and 5 deletions
2
.github/workflows/build_ebpf_modules.yml
vendored
2
.github/workflows/build_ebpf_modules.yml
vendored
|
@ -42,7 +42,7 @@ jobs:
|
|||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
sudo apt-get install git dpkg-dev rpm flex bison ca-certificates wget python3 rsync bc libssl-dev clang llvm libelf-dev libzip-dev git libnetfilter-queue-dev libpcap-dev protobuf-compiler python3-pip dh-golang golang-any golang-golang-x-net-dev golang-google-grpc-dev golang-goprotobuf-dev libmnl-dev golang-github-vishvananda-netlink-dev golang-github-evilsocket-ftrace-dev golang-github-google-gopacket-dev golang-github-fsnotify-fsnotify-dev
|
||||
sudo apt-get install git dpkg-dev rpm flex bison ca-certificates wget python3 rsync bc libssl-dev clang llvm libelf-dev libzip-dev git libnetfilter-queue-dev libpcap-dev protobuf-compiler python3-pip dh-golang golang-any golang-golang-x-net-dev golang-google-grpc-dev golang-goprotobuf-dev libmnl-dev golang-github-vishvananda-netlink-dev golang-github-evilsocket-ftrace-dev golang-github-google-gopacket-dev golang-github-fsnotify-fsnotify-dev linux-headers-$(uname -r)
|
||||
- name: Download kernel sources and compile eBPF modules
|
||||
run: |
|
||||
kernel_version="${{ matrix.kernel }}"
|
||||
|
|
|
@ -31,9 +31,9 @@ fi
|
|||
echo -n "[+] Uncompressing kernel sources: "
|
||||
tar -xf v${kernel_version}.tar.gz && echo "OK" || echo "ERROR"
|
||||
|
||||
echo "[+] Patching kernel sources"
|
||||
if [ "${ARCH}" == "arm" -o "${ARCH}" == "arm64" ]; then
|
||||
patch linux-${kernel_version}/arch/arm/include/asm/unified.h < ebpf_prog/arm-clang-asm-fix.patch
|
||||
echo "[+] Patching kernel sources"
|
||||
patch linux-${kernel_version}/arch/arm/include/asm/unified.h < ebpf_prog/arm-clang-asm-fix.patch
|
||||
fi
|
||||
|
||||
echo -n "[+] Preparing kernel sources... (1-2 minutes): "
|
||||
|
@ -63,8 +63,14 @@ llvm-strip -g ebpf_prog/modules/opensnitch*.o #remove debug info
|
|||
|
||||
if [ -f ebpf_prog/modules/opensnitch.o ]; then
|
||||
echo
|
||||
ls ebpf_prog/modules/*.o
|
||||
echo -e "\n * eBPF modules compiled. Now you can copy the *.o files to /etc/opensnitchd/ and restart the daemon\n"
|
||||
if objdump -h ebpf_prog/modules/opensnitch.o | grep "kprobe/tcp_v4_connect"; then
|
||||
ls ebpf_prog/modules/*.o
|
||||
echo -e "\n * eBPF modules compiled. Now you can copy the *.o files to /etc/opensnitchd/ and restart the daemon\n"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\n [WARN] opensnitch.o module not valid\n"
|
||||
fi
|
||||
else
|
||||
echo -e "\n [WARN] opensnitch.o module not compiled\n"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue