diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2014-11-03 09:19:30 +0100 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-11-19 12:31:41 +0100 |
commit | 1efcf6b31e0d8fcef45693930735cd4a9a385356 (patch) | |
tree | 362bce297a3c48c569a2d300e5835dbd12063642 /net | |
parent | e053cab2408920963e9e121a60f1ca949c269a96 (diff) |
gre6: Move the setting of dev->iflink into the ndo_init functions.
[ Upstream commit f03eb128e3f4276f46442d14f3b8f864f3775821 ]
Otherwise it gets overwritten by register_netdev().
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ip6_gre.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 99988b86f6af..88774ccb3dda 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -965,8 +965,6 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu) else dev->flags &= ~IFF_POINTOPOINT; - dev->iflink = p->link; - /* Precalculate GRE options length */ if (t->parms.o_flags&(GRE_CSUM|GRE_KEY|GRE_SEQ)) { if (t->parms.o_flags&GRE_CSUM) @@ -1269,6 +1267,8 @@ static int ip6gre_tunnel_init(struct net_device *dev) if (!dev->tstats) return -ENOMEM; + dev->iflink = tunnel->parms.link; + return 0; } @@ -1285,7 +1285,6 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev) dev_hold(dev); } - static struct inet6_protocol ip6gre_protocol __read_mostly = { .handler = ip6gre_rcv, .err_handler = ip6gre_err, @@ -1462,6 +1461,8 @@ static int ip6gre_tap_init(struct net_device *dev) if (!dev->tstats) return -ENOMEM; + dev->iflink = tunnel->parms.link; + return 0; } |