public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet•com>
To: David Miller <davem@davemloft•net>
Cc: netdev@vger•kernel.org
Subject: [PATCH net 2/2] ip_tunnel: Add fallback tunnels to the hash lists
Date: Wed, 25 Sep 2013 07:55:19 +0200	[thread overview]
Message-ID: <20130925055519.GW7660@secunet.com> (raw)
In-Reply-To: <20130925055418.GV7660@secunet.com>

Currently we can not update the tunnel parameters of
the fallback tunnels because we don't find them in the
hash lists. Fix this by adding them on initialization.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet•com>
---
 net/ipv4/ip_tunnel.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index b8ce640..f2348f2 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -853,8 +853,10 @@ int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id,
 	/* FB netdevice is special: we have one, and only one per netns.
 	 * Allowing to move it to another netns is clearly unsafe.
 	 */
-	if (!IS_ERR(itn->fb_tunnel_dev))
+	if (!IS_ERR(itn->fb_tunnel_dev)) {
 		itn->fb_tunnel_dev->features |= NETIF_F_NETNS_LOCAL;
+		ip_tunnel_add(itn, netdev_priv(itn->fb_tunnel_dev));
+	}
 	rtnl_unlock();
 
 	return PTR_RET(itn->fb_tunnel_dev);
-- 
1.7.9.5

  reply	other threads:[~2013-09-25  5:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25  5:54 [PATCH net 1/2] ip_tunnel: Fix a memory corruption in ip_tunnel_xmit Steffen Klassert
2013-09-25  5:55 ` Steffen Klassert [this message]
2013-09-25 16:03   ` [PATCH net 2/2] ip_tunnel: Add fallback tunnels to the hash lists Pravin Shelar
2013-09-26  8:13     ` Steffen Klassert
2013-09-26 18:24       ` Pravin Shelar
2013-09-27  7:56         ` Steffen Klassert
2013-09-28  2:40           ` Pravin Shelar
2013-09-25 11:56 ` [PATCH net 1/2] ip_tunnel: Fix a memory corruption in ip_tunnel_xmit Eric Dumazet
2013-09-25 12:13   ` Steffen Klassert
2013-09-25 12:44     ` Eric Dumazet
2013-09-25 16:55 ` Pravin Shelar
2013-09-26  8:25   ` Steffen Klassert
2013-09-26 18:25     ` Pravin Shelar
2013-09-27  7:45       ` Steffen Klassert
2013-09-28  2:34         ` Pravin Shelar
2013-09-30 18:40           ` David Miller
2013-10-01  5:15             ` Steffen Klassert

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=20130925055519.GW7660@secunet.com \
    --to=steffen.klassert@secunet$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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