Skip to contentSkip to conversation

tun: linux socket filter support

PATCH In review Michael S. Tsirkin 3 participants 3 messages Feb 14, 2010 – Feb 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw
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

maintainer
#2 lore raw
In reply to Michael S. Tsirkin

From: "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!