diff options
author | Thadeu Lima de Souza Cascardo <cascardo@redhat.com> | 2016-01-25 11:29:19 -0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-25 10:51:53 -0800 |
commit | 87e57399e9d3606b08b0e1b2dd0f4aaa1d8ba365 (patch) | |
tree | cb0abe5c09f2bc984a1f0561319bc4468c36a689 /net | |
parent | 05f3b50ea81d7af5479b55147ef98f8bbcd4a8b9 (diff) | |
download | linux-87e57399e9d3606b08b0e1b2dd0f4aaa1d8ba365.tar.bz2 |
sit: set rtnl_link_ops before calling register_netdevice
When creating a SIT tunnel with ip tunnel, rtnl_link_ops is not set before
ipip6_tunnel_create is called. When register_netdevice is called, there is
no linkinfo attribute in the NEWLINK message because of that.
Setting rtnl_link_ops before calling register_netdevice fixes that.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/sit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index e794ef66a401..2066d1c25a11 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -201,14 +201,14 @@ static int ipip6_tunnel_create(struct net_device *dev) if ((__force u16)t->parms.i_flags & SIT_ISATAP) dev->priv_flags |= IFF_ISATAP; + dev->rtnl_link_ops = &sit_link_ops; + err = register_netdevice(dev); if (err < 0) goto out; ipip6_tunnel_clone_6rd(dev, sitn); - dev->rtnl_link_ops = &sit_link_ops; - dev_hold(dev); ipip6_tunnel_link(sitn, t); |