* [PATCH net] sit: set rtnl_link_ops before calling register_netdevice
@ 2016-01-25 13:29 Thadeu Lima de Souza Cascardo
2016-01-25 18:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2016-01-25 13:29 UTC (permalink / raw)
To: netdev; +Cc: davem
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>
---
net/ipv6/sit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index e794ef6..2066d1c 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);
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] sit: set rtnl_link_ops before calling register_netdevice
2016-01-25 13:29 [PATCH net] sit: set rtnl_link_ops before calling register_netdevice Thadeu Lima de Souza Cascardo
@ 2016-01-25 18:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-01-25 18:53 UTC (permalink / raw)
To: cascardo; +Cc: netdev
From: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Date: Mon, 25 Jan 2016 11:29:19 -0200
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-25 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 13:29 [PATCH net] sit: set rtnl_link_ops before calling register_netdevice Thadeu Lima de Souza Cascardo
2016-01-25 18:53 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.