summaryrefslogtreecommitdiffstats
path: root/bpf-filter.main.ebpf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:34:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:34:30 +0000
commit4fc2f55f761d71aae1f145d5aa94ba929cc39676 (patch)
tree5c1e1db3b46dd4edbe11f612d93cb94b96891ce3 /bpf-filter.main.ebpf
parentInitial commit. (diff)
downloaddnsdist-upstream/1.7.3.tar.xz
dnsdist-upstream/1.7.3.zip
Adding upstream version 1.7.3.upstream/1.7.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bpf-filter.main.ebpf')
-rw-r--r--bpf-filter.main.ebpf136
1 files changed, 136 insertions, 0 deletions
diff --git a/bpf-filter.main.ebpf b/bpf-filter.main.ebpf
new file mode 100644
index 0000000..4b42a2e
--- /dev/null
+++ b/bpf-filter.main.ebpf
@@ -0,0 +1,136 @@
+/* generated from the bpf_dns_filter() function in bpf-filter.ebpf.src */
+BPF_MOV64_REG(BPF_REG_6,BPF_REG_1),
+BPF_MOV64_IMM(BPF_REG_7,2147483647),
+BPF_LDX_MEM(BPF_W,BPF_REG_1,BPF_REG_6,16),
+BPF_JMP_IMM(BPF_JEQ,BPF_REG_1,ntohs(0x86dd),11),
+BPF_JMP_IMM(BPF_JNE,BPF_REG_1,ntohs(0x0800),109),
+BPF_LD_ABS(BPF_W,-2097126),
+BPF_STX_MEM(BPF_W,BPF_REG_10,BPF_REG_0,-256),
+BPF_LD_MAP_FD(BPF_REG_1,maps->d_v4.d_fd.getHandle()),
+BPF_MOV64_REG(BPF_REG_2,BPF_REG_10),
+BPF_ALU64_IMM(BPF_ADD,BPF_REG_2,-256),
+BPF_RAW_INSN(BPF_JMP|BPF_CALL,0,0,0,BPF_FUNC_map_lookup_elem),
+BPF_JMP_IMM(BPF_JNE,BPF_REG_0,0,98),
+BPF_LD_ABS(BPF_B,-2097129),
+BPF_JMP_IMM(BPF_JA,BPF_REG_0,0,39),
+BPF_LD_ABS(BPF_B,-2097130),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-256),
+BPF_LD_ABS(BPF_B,-2097129),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-255),
+BPF_LD_ABS(BPF_B,-2097128),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-254),
+BPF_LD_ABS(BPF_B,-2097127),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-253),
+BPF_LD_ABS(BPF_B,-2097126),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-252),
+BPF_LD_ABS(BPF_B,-2097125),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-251),
+BPF_LD_ABS(BPF_B,-2097124),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-250),
+BPF_LD_ABS(BPF_B,-2097123),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-249),
+BPF_LD_ABS(BPF_B,-2097122),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-248),
+BPF_LD_ABS(BPF_B,-2097121),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-247),
+BPF_LD_ABS(BPF_B,-2097120),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-246),
+BPF_LD_ABS(BPF_B,-2097119),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-245),
+BPF_LD_ABS(BPF_B,-2097118),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-244),
+BPF_LD_ABS(BPF_B,-2097117),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-243),
+BPF_LD_ABS(BPF_B,-2097116),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-242),
+BPF_LD_ABS(BPF_B,-2097115),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_0,-241),
+BPF_LD_MAP_FD(BPF_REG_1,maps->d_v6.d_fd.getHandle()),
+BPF_MOV64_REG(BPF_REG_2,BPF_REG_10),
+BPF_ALU64_IMM(BPF_ADD,BPF_REG_2,-256),
+BPF_RAW_INSN(BPF_JMP|BPF_CALL,0,0,0,BPF_FUNC_map_lookup_elem),
+BPF_JMP_IMM(BPF_JNE,BPF_REG_0,0,58),
+BPF_LD_ABS(BPF_B,-2097132),
+BPF_ALU64_IMM(BPF_AND,BPF_REG_0,255),
+BPF_JMP_IMM(BPF_JEQ,BPF_REG_0,6,58),
+BPF_MOV64_IMM(BPF_REG_1,0),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_1,-2),
+BPF_STX_MEM(BPF_H,BPF_REG_10,BPF_REG_1,-4),
+BPF_STX_MEM(BPF_W,BPF_REG_10,BPF_REG_1,-8),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-16),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-24),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-32),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-40),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-48),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-56),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-64),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-72),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-80),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-88),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-96),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-104),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-112),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-120),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-128),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-136),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-144),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-152),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-160),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-168),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-176),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-184),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-192),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-200),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-208),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-216),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-224),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-232),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-240),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-248),
+BPF_STX_MEM(BPF_DW,BPF_REG_10,BPF_REG_1,-256),
+BPF_MOV64_IMM(BPF_REG_1,20),
+BPF_STX_MEM(BPF_W,BPF_REG_6,BPF_REG_1,48),
+BPF_LD_ABS(BPF_B,20),
+BPF_MOV64_REG(BPF_REG_8,BPF_REG_0),
+BPF_MOV64_IMM(BPF_REG_7,0),
+BPF_JMP_IMM(BPF_JGT,BPF_REG_8,63,17),
+BPF_JMP_IMM(BPF_JNE,BPF_REG_8,0,18),
+BPF_LD_ABS(BPF_H,21),
+BPF_MOV64_REG(BPF_REG_6,BPF_REG_0),
+BPF_LD_MAP_FD(BPF_REG_1,maps->d_qnames.d_fd.getHandle()),
+BPF_MOV64_REG(BPF_REG_2,BPF_REG_10),
+BPF_ALU64_IMM(BPF_ADD,BPF_REG_2,-256),
+BPF_RAW_INSN(BPF_JMP|BPF_CALL,0,0,0,BPF_FUNC_map_lookup_elem),
+BPF_MOV64_IMM(BPF_REG_7,2147483647),
+BPF_JMP_IMM(BPF_JEQ,BPF_REG_0,0,7),
+BPF_LDX_MEM(BPF_H,BPF_REG_1,BPF_REG_0,8),
+BPF_JMP_IMM(BPF_JEQ,BPF_REG_1,255,2),
+BPF_ALU64_IMM(BPF_AND,BPF_REG_6,65535),
+BPF_JMP_REG(BPF_JNE,BPF_REG_1,BPF_REG_6,3),
+BPF_MOV64_IMM(BPF_REG_1,1),
+BPF_RAW_INSN(BPF_STX|BPF_XADD|BPF_DW,BPF_REG_0,BPF_REG_1,0,0),
+BPF_MOV64_IMM(BPF_REG_7,0),
+BPF_MOV64_REG(BPF_REG_0,BPF_REG_7),
+BPF_EXIT_INSN(),
+BPF_STX_MEM(BPF_W,BPF_REG_6,BPF_REG_8,52),
+BPF_STX_MEM(BPF_B,BPF_REG_10,BPF_REG_8,-256),
+BPF_LD_ABS(BPF_B,21),
+BPF_MOV64_REG(BPF_REG_2,BPF_REG_0),
+BPF_ALU64_IMM(BPF_ADD,BPF_REG_2,-65),
+BPF_ALU64_IMM(BPF_LSH,BPF_REG_2,32),
+BPF_ALU64_IMM(BPF_RSH,BPF_REG_2,32),
+BPF_MOV64_REG(BPF_REG_1,BPF_REG_0),
+BPF_ALU64_IMM(BPF_ADD,BPF_REG_1,32),
+BPF_MOV64_IMM(BPF_REG_3,26),
+BPF_JMP_REG(BPF_JGT,BPF_REG_3,BPF_REG_2,1),
+BPF_MOV64_REG(BPF_REG_1,BPF_REG_0),
+BPF_ALU64_IMM(BPF_ADD,BPF_REG_8,-1),
+BPF_STX_MEM(BPF_W,BPF_REG_6,BPF_REG_8,60),
+BPF_ALU64_IMM(BPF_AND,BPF_REG_1,255),
+BPF_STX_MEM(BPF_W,BPF_REG_6,BPF_REG_1,56),
+BPF_LD_MAP_FD(BPF_REG_2,maps->d_filters.d_fd.getHandle()),
+BPF_MOV64_REG(BPF_REG_1,BPF_REG_6),
+BPF_MOV64_IMM(BPF_REG_3,0),
+BPF_RAW_INSN(BPF_JMP|BPF_CALL,0,0,0,BPF_FUNC_tail_call),
+BPF_MOV64_IMM(BPF_REG_7,2147483647),
+BPF_JMP_IMM(BPF_JA,BPF_REG_0,0,-25),