]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
vti6: fix device register to report IFLA_INFO_KIND
authorDavid Forster <dforster@brocade.com>
Fri, 6 Jan 2017 10:27:59 +0000 (10:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Jan 2017 21:09:09 +0000 (16:09 -0500)
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>
net/ipv6/ip6_vti.c

index f4b4a4a5f4ba740f4a290e2394034fe335941abe..d82042c8d8fd4b38eac12a58eb634438aab726a7 100644 (file)
@@ -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);