Allow matching on local and remote IPs
[bpfnofrags] / egress_tc.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("egress")
8 int tc_egress(struct __sk_buff *ctx)
9 {
10         maybe_swap_egress_eth((void *)(size_t)ctx->data, (void *)(size_t)ctx->data_end);
11
12         return TC_ACT_OK;
13 }