tun: linux socket filter support
Subsystems (2)
cover tun: linux socket filter support
tun module already support RX filtering, however, this is limited to filtering by mac address. For virtio host, we also need filtering by vlan.
Rather than adding this directly, it seems cleaner to add generic socket filter support.
Michael S. Tsirkin (2):
net: export attach/detach filter routines
tun: socket filter support
drivers/net/tun.c | 26 ++++++++++++++++++++++++++ include/linux/if_tun.h | 3 +++ net/core/filter.c | 2 ++ 3 files changed, 31 insertions(+), 0 deletions(-)
Quoted 6 lines · Michael S. Tsirkin
tun module already support RX filtering, however, this is limited to filtering by mac address. For virtio host, we also need filtering by vlan.
Rather than adding this directly, it seems cleaner to add generic socket filter support.
Great idea, I was wondering how to do vlan filtering in macvtap with trunk mode. I guess it would be straightforward to do the same patch in macvtap, right?
Arnd
David Miller
maintainerFrom: "Michael S. Tsirkin" <[email protected]>
Date: Sun, 14 Feb 2010 13:00:51 +0200
Quoted 6 lines
tun module already support RX filtering, however, this is limited to filtering by mac address. For virtio host, we also need filtering by vlan.
Rather than adding this directly, it seems cleaner to add generic socket filter support.
Both applied to net-next-2.6, thanks!