summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2014-11-03 09:19:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-21 09:23:00 -0800
commit4dd750b420b5753611ccde564e9fe5ebe18bcf7d (patch)
treee55e0b7a2c73cea428b6ad444b2b5da413ed3b63 /net
parent6dfa82b47afc05b4d8885c09191d93c1e531d463 (diff)
downloadkernel-common-4dd750b420b5753611ccde564e9fe5ebe18bcf7d.tar.gz
kernel-common-4dd750b420b5753611ccde564e9fe5ebe18bcf7d.tar.bz2
kernel-common-4dd750b420b5753611ccde564e9fe5ebe18bcf7d.zip
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ip6_gre.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index cb57aa862177..b27f6d34762b 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -962,8 +962,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)
@@ -1273,6 +1271,7 @@ static int ip6gre_tunnel_init(struct net_device *dev)
u64_stats_init(&ip6gre_tunnel_stats->syncp);
}
+ dev->iflink = tunnel->parms.link;
return 0;
}
@@ -1474,6 +1473,8 @@ static int ip6gre_tap_init(struct net_device *dev)
u64_stats_init(&ip6gre_tap_stats->syncp);
}
+ dev->iflink = tunnel->parms.link;
+
return 0;
}