History

tun: allow to attach ebpf socket filter

This patch allows userspace to attach eBPF filter to tun. This will allow to implement VM dataplane filtering in a more efficient way compared to cBPF filter by allowing either qemu or libvirt to attach eBPF filter to tun.

Jason Wang committed 8 years ago

Commit aff3d701 parent cd5681d2 files · +35 −4Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/if_tun.h+1−0
@@ -58,6 +58,7 @@ · 57 unmodified lines
58#define TUNSETVNETBE _IOW('T', 222, int)58#define TUNSETVNETBE _IOW('T', 222, int)
59#define TUNGETVNETBE _IOR('T', 223, int)59#define TUNGETVNETBE _IOR('T', 223, int)
60#define TUNSETSTEERINGEBPF _IOR('T', 224, int)60#define TUNSETSTEERINGEBPF _IOR('T', 224, int)
61#define TUNSETFILTEREBPF _IOR('T', 225, int)
61 62
62/* TUNSETIFF ifr flags */63/* TUNSETIFF ifr flags */
63#define IFF_TUN 0x000164#define IFF_TUN 0x0001

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t