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>

authored by Krishna Kumar and committed by David S. Miller 0553c891 70dda99c

+2 -1
+2 -1
drivers/net/loopback.c
··· 173 173 | NETIF_F_RXCSUM 174 174 | NETIF_F_HIGHDMA 175 175 | NETIF_F_LLTX 176 - | NETIF_F_NETNS_LOCAL; 176 + | NETIF_F_NETNS_LOCAL 177 + | NETIF_F_VLAN_CHALLENGED; 177 178 dev->ethtool_ops = &loopback_ethtool_ops; 178 179 dev->header_ops = &eth_header_ops; 179 180 dev->netdev_ops = &loopback_ops;