mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
encap-forward: Don't redefine AF_INET
Only conditionally define AF_INET so we don't get warnings about it being redefined. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This commit is contained in:
@@ -12,7 +12,9 @@
|
|||||||
#define ENCAP_TYPE BPF_F_ADJ_ROOM_ENCAP_L3_IPV4
|
#define ENCAP_TYPE BPF_F_ADJ_ROOM_ENCAP_L3_IPV4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef AF_INET
|
||||||
#define AF_INET 2
|
#define AF_INET 2
|
||||||
|
#endif
|
||||||
|
|
||||||
SEC("classifier") int tc_encap(struct __sk_buff *skb)
|
SEC("classifier") int tc_encap(struct __sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user