Allow matching on local and remote IPs
[bpfnofrags] / ingress_xdp.c
1 #include "swapper.h"
2
3 #include <linux/bpf.h>
4 #include <linux/pkt_cls.h>
5 #include <bpf/bpf_helpers.h>
6
7 SEC("xdp_ingress")
8 int xdp_ingress_prog(struct xdp_md *ctx)
9 {
10         maybe_swap_ingress_eth((void *)(size_t)ctx->data, (void *)(size_t)ctx->data_end);
11
12         return XDP_PASS;
13 }