Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions elf/include/uapi/linux/bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -837,14 +837,14 @@ union bpf_attr {
*
* int ret;
* struct bpf_tunnel_key key = {};
*
*
* ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);
* if (ret < 0)
* return TC_ACT_SHOT; // drop packet
*
*
* if (key.remote_ipv4 != 0x0a000001)
* return TC_ACT_SHOT; // drop packet
*
*
* return TC_ACT_OK; // accept packet
*
* This interface can also be used with all encapsulation devices
Expand Down Expand Up @@ -3054,4 +3054,12 @@ struct bpf_line_info {
__u32 line_col;
};

#ifndef SO_ATTACH_BPF
#define SO_ATTACH_BPF 50
#endif

#ifndef SO_DETACH_BPF
#define SO_DETACH_BPF SO_DETACH_FILTER
#endif

#endif /* _UAPI__LINUX_BPF_H__ */