diff --git a/internal/ebpf-c/xdp.c b/internal/ebpf-c/xdp.c index e3c01f1..757392a 100644 --- a/internal/ebpf-c/xdp.c +++ b/internal/ebpf-c/xdp.c @@ -131,6 +131,7 @@ int xdp_durdur_func(struct xdp_md *ctx) struct iphdr *ip = data + sizeof(struct ethhdr); __u32 ip_src = ip->saddr; + printk("IP %s", &ip_src); long *pkt_count = bpf_map_lookup_elem(&drop_src_addrs, &ip_src); if (pkt_count) { @@ -138,6 +139,7 @@ int xdp_durdur_func(struct xdp_md *ctx) return XDP_DROP; } + if (ip->protocol == IPPROTO_UDP) { struct udphdr *udp;