netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: Pravin Shelar <pshelar@nicira.com>, netdev@vger.kernel.org
Subject: [PATCH net v2 2/4] ip_tunnel: Add fallback tunnels to the hash lists
Date: Tue, 1 Oct 2013 11:34:48 +0200	[thread overview]
Message-ID: <20131001093448.GH7660@secunet.com> (raw)
In-Reply-To: <20131001093359.GG7660@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.

Bug was introduced with commit c544193214
("GRE: Refactor GRE tunneling code.")

Cc: Pravin Shelar <pshelar@nicira.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---

v2: Add a reference to the commit that introduced bug to the commit message

 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 dfc6d8a..895a353 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-10-01  9:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01  9:33 [PATCH net v2 1/4] ip_tunnel: Fix a memory corruption in ip_tunnel_xmit Steffen Klassert
2013-10-01  9:34 ` Steffen Klassert [this message]
2013-10-01 16:43   ` [PATCH net v2 2/4] ip_tunnel: Add fallback tunnels to the hash lists David Miller
2013-10-01  9:35 ` [PATCH net 3/4] ip_tunnel_core: Change __skb_push back to skb_push Steffen Klassert
2013-10-01 16:43   ` David Miller
2013-10-01  9:37 ` [PATCH net 4/4] ip_tunnel: Remove double unregister of the fallback device Steffen Klassert
2013-10-01 10:00   ` Nicolas Dichtel
2013-10-01 10:40     ` Steffen Klassert
2013-10-01 11:30       ` Nicolas Dichtel
2013-10-01 16:04         ` [PATCH net 1/2] sit: allow to use rtnl ops on fb tunnel Nicolas Dichtel
2013-10-01 16:05           ` [PATCH net 2/2] ip6tnl: " Nicolas Dichtel
2013-10-01 16:59             ` David Miller
2013-10-02  7:16               ` Nicolas Dichtel
2013-10-01 16:59           ` [PATCH net 1/2] sit: " David Miller
2013-10-02  7:15             ` Nicolas Dichtel
2013-10-02  7:36               ` Nicolas Dichtel
2013-10-02 21:08                 ` David Miller
2013-10-03  8:06                   ` Nicolas Dichtel
2013-10-03 17:37                     ` David Miller
2013-10-21 23:30               ` Willem de Bruijn
2013-10-22  7:34                 ` Nicolas Dichtel
2013-10-01 16:43   ` [PATCH net 4/4] ip_tunnel: Remove double unregister of the fallback device David Miller
2013-10-01 16:43 ` [PATCH net v2 1/4] ip_tunnel: Fix a memory corruption in ip_tunnel_xmit 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=20131001093448.GH7660@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.com \
    /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).