From 440ab3f885877946faacea95bcbbb44a5f235abb Mon Sep 17 00:00:00 2001 From: r-caamano Date: Tue, 5 Dec 2023 00:37:24 +0000 Subject: [PATCH] working dns map write --- src/zfw_xdp_dns_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zfw_xdp_dns_filter.c b/src/zfw_xdp_dns_filter.c index 10c41fa..5732127 100644 --- a/src/zfw_xdp_dns_filter.c +++ b/src/zfw_xdp_dns_filter.c @@ -142,7 +142,7 @@ int xdp_filter(struct xdp_md *ctx) { } } long ret = set_dns(i, dns_payload); - if (ret < 0){ + if (ret > 0){ bpf_printk("wrote %d characters", ret); } dns_payload = (dns_payload + dns_name_len + 4);