summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>2016-01-25 11:29:19 -0200
committerDavid S. Miller <davem@davemloft.net>2016-01-25 10:51:53 -0800
commit87e57399e9d3606b08b0e1b2dd0f4aaa1d8ba365 (patch)
treecb0abe5c09f2bc984a1f0561319bc4468c36a689
parent05f3b50ea81d7af5479b55147ef98f8bbcd4a8b9 (diff)
downloadblackbird-op-linux-87e57399e9d3606b08b0e1b2dd0f4aaa1d8ba365.tar.gz
blackbird-op-linux-87e57399e9d3606b08b0e1b2dd0f4aaa1d8ba365.zip
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>
-rw-r--r--net/ipv6/sit.c4
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);
OpenPOWER on IntegriCloud