From 5a7aa461de92b845ec757012d43d73d41ab50393 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Mon, 15 Jan 2024 18:04:19 +0100 Subject: [PATCH] Remove debug lines (#1468) Remove print lines from EBPF code --- client/internal/ebpf/ebpf/bpf_bpfeb.go | 1 - client/internal/ebpf/ebpf/bpf_bpfeb.o | Bin 15960 -> 14032 bytes client/internal/ebpf/ebpf/bpf_bpfel.go | 3 +-- client/internal/ebpf/ebpf/bpf_bpfel.o | Bin 15960 -> 14032 bytes client/internal/ebpf/ebpf/src/dns_fwd.c | 6 +++--- client/internal/ebpf/ebpf/src/prog.c | 8 +------- client/internal/ebpf/ebpf/src/readme.md | 12 ++++++++++++ client/internal/ebpf/ebpf/src/wg_proxy.c | 4 ++-- 8 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 client/internal/ebpf/ebpf/src/readme.md diff --git a/client/internal/ebpf/ebpf/bpf_bpfeb.go b/client/internal/ebpf/ebpf/bpf_bpfeb.go index 5d276586246..04b19883b5a 100644 --- a/client/internal/ebpf/ebpf/bpf_bpfeb.go +++ b/client/internal/ebpf/ebpf/bpf_bpfeb.go @@ -1,6 +1,5 @@ // Code generated by bpf2go; DO NOT EDIT. //go:build arm64be || armbe || mips || mips64 || mips64p32 || ppc64 || s390 || s390x || sparc || sparc64 -// +build arm64be armbe mips mips64 mips64p32 ppc64 s390 s390x sparc sparc64 package ebpf diff --git a/client/internal/ebpf/ebpf/bpf_bpfeb.o b/client/internal/ebpf/ebpf/bpf_bpfeb.o index 0559da486ebeb13a7f0dbf21ed0d3bf4d40e76c3..6e9cda44a653f1d726a95d1cab30c898967402f6 100644 GIT binary patch literal 14032 zcmds8e{5XGao%@FN++jws3xwN)~TOtSvtuUb);lVfg<^?YVgo`G zv_$`?`+d7J@Ag(8qM&L2$inY-zM0vb+1c57@A1i(Pn`N_E*F`sMdm+2dyGs1Vr0>x zvixp0(cplkv!B5@BQ5c(4n|+EIO1Vrwv(#LxI3Zd1z195C3*j|N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/dns_fwd.c index 5228c7e758e..5f3fbcc3279 100644 --- a/client/internal/ebpf/ebpf/src/dns_fwd.c +++ b/client/internal/ebpf/ebpf/src/dns_fwd.c @@ -46,8 +46,8 @@ int xdp_dns_fwd(struct iphdr *ip, struct udphdr *udp) { if(!read_settings()){ return XDP_PASS; } - bpf_printk("dns port: %d", ntohs(dns_port)); - bpf_printk("dns ip: %d", ntohl(dns_ip)); + // bpf_printk("dns port: %d", ntohs(dns_port)); + // bpf_printk("dns ip: %d", ntohl(dns_ip)); } if (udp->dest == GENERAL_DNS_PORT && ip->daddr == dns_ip) { @@ -61,4 +61,4 @@ int xdp_dns_fwd(struct iphdr *ip, struct udphdr *udp) { } return XDP_PASS; -} \ No newline at end of file +} diff --git a/client/internal/ebpf/ebpf/src/prog.c b/client/internal/ebpf/ebpf/src/prog.c index 09b6493700f..f32103f2850 100644 --- a/client/internal/ebpf/ebpf/src/prog.c +++ b/client/internal/ebpf/ebpf/src/prog.c @@ -8,12 +8,6 @@ #include "dns_fwd.c" #include "wg_proxy.c" -#define bpf_printk(fmt, ...) \ - ({ \ - char ____fmt[] = fmt; \ - bpf_trace_printk(____fmt, sizeof(____fmt), ##__VA_ARGS__); \ - }) - const __u16 flag_feature_wg_proxy = 0b01; const __u16 flag_feature_dns_fwd = 0b10; @@ -63,4 +57,4 @@ int nb_xdp_prog(struct xdp_md *ctx) { } return XDP_PASS; } -char _license[] SEC("license") = "GPL"; \ No newline at end of file +char _license[] SEC("license") = "GPL"; diff --git a/client/internal/ebpf/ebpf/src/readme.md b/client/internal/ebpf/ebpf/src/readme.md new file mode 100644 index 00000000000..f0582ea3257 --- /dev/null +++ b/client/internal/ebpf/ebpf/src/readme.md @@ -0,0 +1,12 @@ +# Debug + + +The CONFIG_BPF_EVENTS kernel module is required for bpf_printk. +Apply this code to use bpf_printk +``` +#define bpf_printk(fmt, ...) \ + ({ \ + char ____fmt[] = fmt; \ + bpf_trace_printk(____fmt, sizeof(____fmt), ##__VA_ARGS__); \ + }) +``` diff --git a/client/internal/ebpf/ebpf/src/wg_proxy.c b/client/internal/ebpf/ebpf/src/wg_proxy.c index ecfedc6b398..88fea65cf58 100644 --- a/client/internal/ebpf/ebpf/src/wg_proxy.c +++ b/client/internal/ebpf/ebpf/src/wg_proxy.c @@ -34,7 +34,7 @@ int xdp_wg_proxy(struct iphdr *ip, struct udphdr *udp) { if (!read_port_settings()){ return XDP_PASS; } - bpf_printk("proxy port: %d, wg port: %d", proxy_port, wg_port); + // bpf_printk("proxy port: %d, wg port: %d", proxy_port, wg_port); } // 2130706433 = 127.0.0.1 @@ -51,4 +51,4 @@ int xdp_wg_proxy(struct iphdr *ip, struct udphdr *udp) { udp->dest = new_dst_port; udp->source = new_src_port; return XDP_PASS; -} \ No newline at end of file +}