diff mbox

[v1] ip6_pol_route panic: Do not allow VLAN on loopback

Message ID 20110414160704.32251.17281.sendpatchset@krkumar2.in.ibm.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Krishna Kumar April 14, 2011, 4:07 p.m. UTC
I have tested two ways of fixing this panic:
	1. PATCH1: Do not allow vlan on lo.
	2. PATCH2: Do not propagate LOOPBACK to vlan devices.

Isn't it better to use PATCH1 and disallow vlan on lo?

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>
---
 drivers/net/loopback.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller April 18, 2011, 6:27 a.m. UTC | #1
From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Thu, 14 Apr 2011 21:37:04 +0530

> I have tested two ways of fixing this panic:
> 	1. PATCH1: Do not allow vlan on lo.
> 	2. PATCH2: Do not propagate LOOPBACK to vlan devices.
> 
> Isn't it better to use PATCH1 and disallow vlan on lo?
> 
> 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>

I applied this patch #1, and added some commentary to the commit message
to explain the ipv6 crash issue this fixes.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff -ruNp org/drivers/net/loopback.c new1/drivers/net/loopback.c
--- org/drivers/net/loopback.c	2011-04-14 20:45:46.000000000 +0530
+++ new1/drivers/net/loopback.c	2011-04-14 20:47:09.000000000 +0530
@@ -173,7 +173,8 @@  static void loopback_setup(struct net_de
 		| 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;