diff options
author | Krishna Kumar <krkumar2@in.ibm.com> | 2011-04-14 06:07:04 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-17 23:27:16 -0700 |
commit | 0553c891fabd287726b41076cfd03fe7e5ab596f (patch) | |
tree | 6b8b7074ff457e1533e8c397e09c03cd86ddc76e /drivers/net/loopback.c | |
parent | 70dda99c41fc8a153e09bdba9adb7805ba2a4bb3 (diff) | |
download | op-kernel-dev-0553c891fabd287726b41076cfd03fe7e5ab596f.zip op-kernel-dev-0553c891fabd287726b41076cfd03fe7e5ab596f.tar.gz |
ip6_pol_route panic: Do not allow VLAN on loopback
Several tests in the ipv6 routing code check IFF_LOOPBACK, and
allowing stacking such as VLAN'ing on top of loopback results in a
netdevice which reports IFF_LOOPBACK but really isn't the loopback
device.
Instead of spamming the ipv6 routing code with even more special tests,
simply disallow VLAN over loopback.
The result of this patch is:
# modprobe 8021q
# vconfig add lo 43
ERROR: trying to add VLAN #43 to IF -:lo:- error: Operation not supported
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r-- | drivers/net/loopback.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index ea0dc45..d70fb76 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -173,7 +173,8 @@ static void loopback_setup(struct net_device *dev) | NETIF_F_RXCSUM | NETIF_F_HIGHDMA | NETIF_F_LLTX - | NETIF_F_NETNS_LOCAL; + | NETIF_F_NETNS_LOCAL + | NETIF_F_VLAN_CHALLENGED; dev->ethtool_ops = &loopback_ethtool_ops; dev->header_ops = ð_header_ops; dev->netdev_ops = &loopback_ops; |