netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krishna Kumar <krkumar2@in.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Krishna Kumar <krkumar2@in.ibm.com>
Subject: [PATCH v1] ip6_pol_route panic: Do not allow VLAN on loopback
Date: Thu, 14 Apr 2011 21:37:04 +0530	[thread overview]
Message-ID: <20110414160704.32251.17281.sendpatchset@krkumar2.in.ibm.com> (raw)

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;

             reply	other threads:[~2011-04-14 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14 16:07 Krishna Kumar [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110414160704.32251.17281.sendpatchset@krkumar2.in.ibm.com \
    --to=krkumar2@in.ibm.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).