Skip to content

Commit

Permalink
ip6_pol_route panic: Do not allow VLAN on loopback
Browse files Browse the repository at this point in the history
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 grate-driver#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>
  • Loading branch information
krkumar authored and davem330 committed Apr 18, 2011
1 parent 70dda99 commit 0553c89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = &eth_header_ops;
dev->netdev_ops = &loopback_ops;
Expand Down

0 comments on commit 0553c89

Please sign in to comment.