netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netdev: don't always reset iflink when registering
@ 2010-03-20  1:39 Tom Goff
  2010-03-22 17:42 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Goff @ 2010-03-20  1:39 UTC (permalink / raw)
  To: netdev

Bound tunnel devices set their iflink to the ifindex of the underlying
network interface when created.  It shouldn't be reset by the
registration process.

Signed-off-by: Tom Goff <thomas.goff@boeing.com>
---
 net/core/dev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 59d4394..c00d625 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5067,7 +5067,8 @@ int register_netdevice(struct net_device *dev)
 	netdev_set_addr_lockdep_class(dev);
 	netdev_init_queue_locks(dev);
 
-	dev->iflink = -1;
+	if (dev->iflink <= 0)
+		dev->iflink = -1;
 
 	/* Init, if this function is available */
 	if (dev->netdev_ops->ndo_init) {
-- 
1.6.3.3


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

end of thread, other threads:[~2010-03-23  3:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20  1:39 [PATCH] netdev: don't always reset iflink when registering Tom Goff
2010-03-22 17:42 ` Patrick McHardy
2010-03-22 19:06   ` Goff, Thomas
2010-03-23  3:20     ` 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).