Skip to contentSkip to conversation

gre6: allow to update all parameters via rtnl

PATCH In review Nicolas Dichtel 2 participants 2 messages Dec 3, 2015 – Dec 4, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gre6: allow to update all parameters via rtnl

Parameters were updated only if the kernel was unable to find the tunnel with the new parameters, ie only if core pamareters were updated (keys, addr, link, type).
Now it's possible to update ttl, hoplimit, flowinfo and flags.

Fixes c12b395a4664 ("gre: Support GRE over IPv6")
---
 net/ipv6/ip6_gre.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
net/ipv6/ip6_gre.c +3 -5
index 3c7b9310b33f..e5ea177d34c6 100644
@@ -1571,13 +1571,11 @@ static int ip6gre_changelink(struct net_device *dev, struct nlattr *tb[],
 			return -EEXIST;
 	} else {
 		t = nt;
-
-		ip6gre_tunnel_unlink(ign, t);
-		ip6gre_tnl_change(t, &p, !tb[IFLA_MTU]);
-		ip6gre_tunnel_link(ign, t);
-		netdev_state_change(dev);
 	}
 
+	ip6gre_tunnel_unlink(ign, t);
+	ip6gre_tnl_change(t, &p, !tb[IFLA_MTU]);
+	ip6gre_tunnel_link(ign, t);
 	return 0;
 }
 
Signature · 1 line
2.4.2
maintainer
#1 lore raw

From: Nicolas Dichtel <[email protected]>
Date: Thu, 3 Dec 2015 17:21:50 +0100

Quoted 7 lines

Parameters were updated only if the kernel was unable to find the tunnel with the new parameters, ie only if core pamareters were updated (keys, addr, link, type).
Now it's possible to update ttl, hoplimit, flowinfo and flags.

Fixes c12b395a4664 ("gre: Support GRE over IPv6")

Applied and queued up for -stable, thanks.