]> git.baikalelectronics.ru Git - kernel.git/commit
ip6_pol_route panic: Do not allow VLAN on loopback
authorKrishna Kumar <krkumar2@in.ibm.com>
Thu, 14 Apr 2011 06:07:04 +0000 (06:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Apr 2011 06:27:16 +0000 (23:27 -0700)
commit26e6ee9adb1c648a235f7060eb6b2f39d22b23ea
tree6b8b7074ff457e1533e8c397e09c03cd86ddc76e
parent473f180e63fe7057c58079f6d6c4d9cd270b992d
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>
drivers/net/loopback.c