Skip to content

Commit

Permalink
gre6: Move the setting of dev->iflink into the ndo_init functions.
Browse files Browse the repository at this point in the history
Otherwise it gets overwritten by register_netdev().

Signed-off-by: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
klassert authored and davem330 committed Nov 3, 2014
1 parent ebe084a commit f03eb12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/ipv6/ip6_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,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)
Expand Down Expand Up @@ -1272,6 +1270,7 @@ static int ip6gre_tunnel_init(struct net_device *dev)
u64_stats_init(&ip6gre_tunnel_stats->syncp);
}

dev->iflink = tunnel->parms.link;

return 0;
}
Expand Down Expand Up @@ -1481,6 +1480,8 @@ static int ip6gre_tap_init(struct net_device *dev)
if (!dev->tstats)
return -ENOMEM;

dev->iflink = tunnel->parms.link;

return 0;
}

Expand Down

0 comments on commit f03eb12

Please sign in to comment.