netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback
@ 2011-04-14 16:07 Krishna Kumar
  2011-04-14 16:07 ` [PATCH v2] ip6_pol_route panic: Do not propagate LOOPBACK to VLAN Krishna Kumar
  2011-04-18  6:27 ` [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Krishna Kumar @ 2011-04-14 16:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, Krishna Kumar

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(-)

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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] ip6_pol_route panic: Do not propagate LOOPBACK to VLAN
  2011-04-14 16:07 [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback Krishna Kumar
@ 2011-04-14 16:07 ` Krishna Kumar
  2011-04-18  6:27 ` [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Krishna Kumar @ 2011-04-14 16:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, Krishna Kumar

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
# ifconfig lo.69 hw ether 00:80:48:BA:d1:30
# ping6 -c 3 fe80::280:48ff:feba:d130
connect: Cannot assign requested address
(no panic)

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
 net/8021q/vlan_dev.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -ruNp org/net/8021q/vlan_dev.c new2/net/8021q/vlan_dev.c
--- org/net/8021q/vlan_dev.c	2011-04-14 20:42:56.000000000 +0530
+++ new2/net/8021q/vlan_dev.c	2011-04-14 20:44:35.000000000 +0530
@@ -525,7 +525,8 @@ static int vlan_dev_init(struct net_devi
 
 	/* IFF_BROADCAST|IFF_MULTICAST; ??? */
 	dev->flags  = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI |
-					  IFF_MASTER | IFF_SLAVE);
+					  IFF_MASTER | IFF_SLAVE |
+					  IFF_LOOPBACK);
 	dev->iflink = real_dev->ifindex;
 	dev->state  = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) |
 					  (1<<__LINK_STATE_DORMANT))) |

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback
  2011-04-14 16:07 [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback Krishna Kumar
  2011-04-14 16:07 ` [PATCH v2] ip6_pol_route panic: Do not propagate LOOPBACK to VLAN Krishna Kumar
@ 2011-04-18  6:27 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2011-04-18  6:27 UTC (permalink / raw)
  To: krkumar2; +Cc: netdev

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-18  6:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-14 16:07 [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback Krishna Kumar
2011-04-14 16:07 ` [PATCH v2] ip6_pol_route panic: Do not propagate LOOPBACK to VLAN Krishna Kumar
2011-04-18  6:27 ` [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).