All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 1/2] ovs/vxlan: fix rtnl notifications on iface deletion
@ 2016-06-10  9:32 Nicolas Dichtel
  2016-06-10  9:32 ` [PATCH net 2/2] ovs/gre: " Nicolas Dichtel
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Nicolas Dichtel @ 2016-06-10  9:32 UTC (permalink / raw)
  To: davem; +Cc: netdev, Nicolas Dichtel, Thomas Graf, Pravin B Shelar

The function vxlan_dev_create() (only used by ovs) never calls
rtnl_configure_link(). The consequence is that dev->rtnl_link_state is
never set to RTNL_LINK_INITIALIZED.
During the deletion phase, the function rollback_registered_many() sends
a RTM_DELLINK only if dev->rtnl_link_state is set to RTNL_LINK_INITIALIZED.

Fixes: dcc38c033b32 ("openvswitch: Re-add CONFIG_OPENVSWITCH_VXLAN")
CC: Thomas Graf <tgraf@suug.ch>
CC: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 drivers/net/vxlan.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index f999db2f97b4..f7669d60b3f7 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2972,6 +2972,12 @@ struct net_device *vxlan_dev_create(struct net *net, const char *name,
 		return ERR_PTR(err);
 	}
 
+	err = rtnl_configure_link(dev, NULL);
+	if (err < 0) {
+		free_netdev(dev);
+		return ERR_PTR(err);
+	}
+
 	return dev;
 }
 EXPORT_SYMBOL_GPL(vxlan_dev_create);
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-06-15  5:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-10  9:32 [PATCH net 1/2] ovs/vxlan: fix rtnl notifications on iface deletion Nicolas Dichtel
2016-06-10  9:32 ` [PATCH net 2/2] ovs/gre: " Nicolas Dichtel
2016-06-10 17:50   ` pravin shelar
2016-06-10 17:50 ` [PATCH net 1/2] ovs/vxlan: " pravin shelar
2016-06-13  7:44   ` Nicolas Dichtel
2016-06-13  8:31   ` [PATCH net v2 0/4] ovs: fix rtnl notifications on interface deletion Nicolas Dichtel
2016-06-13  8:31     ` [PATCH net v2 1/4] ovs/gre,geneve: fix error path when creating an iface Nicolas Dichtel
2016-06-13  8:31     ` [PATCH net v2 2/4] ovs/vxlan: fix rtnl notifications on iface deletion Nicolas Dichtel
2016-06-13  8:31     ` [PATCH net v2 3/4] ovs/gre: " Nicolas Dichtel
2016-06-13  8:31     ` [PATCH net v2 4/4] ovs/geneve: " Nicolas Dichtel
2016-06-13 19:39     ` [PATCH net v2 0/4] ovs: fix rtnl notifications on interface deletion pravin shelar
2016-06-15  5:22       ` David Miller
2016-06-10 17:52 ` [PATCH net 1/2] ovs/vxlan: fix rtnl notifications on iface deletion Jesse Gross
2016-06-13  8:12   ` Nicolas Dichtel

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.