Skip to content

Commit

Permalink
vti6: fix device register to report IFLA_INFO_KIND
Browse files Browse the repository at this point in the history
vti6 interface is registered before the rtnl_link_ops block
is attached. As a result the resulting RTM_NEWLINK is missing
IFLA_INFO_KIND. Re-order attachment of rtnl_link_ops block to fix.

Signed-off-by: Dave Forster <dforster@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Forster authored and David S. Miller committed Jan 6, 2017
1 parent 5ca7d1c commit 93e246f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/ip6_vti.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ static int vti6_tnl_create2(struct net_device *dev)
struct vti6_net *ip6n = net_generic(net, vti6_net_id);
int err;

dev->rtnl_link_ops = &vti6_link_ops;
err = register_netdevice(dev);
if (err < 0)
goto out;

strcpy(t->parms.name, dev->name);
dev->rtnl_link_ops = &vti6_link_ops;

dev_hold(dev);
vti6_tnl_link(ip6n, t);
Expand Down

0 comments on commit 93e246f

Please sign in to comment.