summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Douma <nicolas@serveur.io>2020-04-29 02:55:15 +0200
committerNicolas Douma <nicolas@serveur.io>2020-04-29 02:55:15 +0200
commitb2f096989136af35b99903a7e3fe8565fbcaaf1b (patch)
tree39a266c1449c390de5627d843318c2f8db71292f
parentForbid setsockopt(SOL_SOCKET, SO_MARK) (diff)
downloadnetifexec-master.tar.xz
netifexec-master.zip
Update eBPF xlated instructions for setsockopt() filterHEADmaster
-rw-r--r--netifexec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/netifexec.c b/netifexec.c
index 34e71a8..ea8f586 100644
--- a/netifexec.c
+++ b/netifexec.c
@@ -438,11 +438,13 @@ static void hook_setsockopt(int cgroupfd, char *iface)
/*
* 0: (b7) r0 = 1
* 1: (61) r2 = *(u32 *)(r1 +24)
- * 2: (55) if r2 != 0x1 goto pc+3
+ * 2: (55) if r2 != 0x1 goto pc+5
* 3: (61) r2 = *(u32 *)(r1 +28)
- * 4: (55) if r2 != 0x19 goto pc+1
- * 5: (b7) r0 = 0
- * 6: (95) exit
+ * 4: (15) if r2 == 0x19 goto pc+2
+ * 5: (15) if r2 == 0x24 goto pc+1
+ * 6: (05) goto pc+1
+ * 7: (b7) r0 = 0
+ * 8: (95) exit
*/
struct bpf_insn bpf_program[] = {