Commit 1efcf6b3 authored by Steffen Klassert's avatar Steffen Klassert Committed by Jiri Slaby

gre6: Move the setting of dev->iflink into the ndo_init functions.

[ Upstream commit f03eb128 ]

Otherwise it gets overwritten by register_netdev().
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent e053cab2
...@@ -965,8 +965,6 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu) ...@@ -965,8 +965,6 @@ static void ip6gre_tnl_link_config(struct ip6_tnl *t, int set_mtu)
else else
dev->flags &= ~IFF_POINTOPOINT; dev->flags &= ~IFF_POINTOPOINT;
dev->iflink = p->link;
/* Precalculate GRE options length */ /* Precalculate GRE options length */
if (t->parms.o_flags&(GRE_CSUM|GRE_KEY|GRE_SEQ)) { if (t->parms.o_flags&(GRE_CSUM|GRE_KEY|GRE_SEQ)) {
if (t->parms.o_flags&GRE_CSUM) if (t->parms.o_flags&GRE_CSUM)
...@@ -1269,6 +1267,8 @@ static int ip6gre_tunnel_init(struct net_device *dev) ...@@ -1269,6 +1267,8 @@ static int ip6gre_tunnel_init(struct net_device *dev)
if (!dev->tstats) if (!dev->tstats)
return -ENOMEM; return -ENOMEM;
dev->iflink = tunnel->parms.link;
return 0; return 0;
} }
...@@ -1285,7 +1285,6 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev) ...@@ -1285,7 +1285,6 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
dev_hold(dev); dev_hold(dev);
} }
static struct inet6_protocol ip6gre_protocol __read_mostly = { static struct inet6_protocol ip6gre_protocol __read_mostly = {
.handler = ip6gre_rcv, .handler = ip6gre_rcv,
.err_handler = ip6gre_err, .err_handler = ip6gre_err,
...@@ -1462,6 +1461,8 @@ static int ip6gre_tap_init(struct net_device *dev) ...@@ -1462,6 +1461,8 @@ static int ip6gre_tap_init(struct net_device *dev)
if (!dev->tstats) if (!dev->tstats)
return -ENOMEM; return -ENOMEM;
dev->iflink = tunnel->parms.link;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment