From: Paul Blakey <[email protected]>

There is a race between listening on route changes from route-table
netlink which then calls ovs_router_insert() where it adds the involved
netdev to the tnl-ports map (tnl_port_map_insert_ipdev()),
and netdev_open from from normal opening of the port.

tnl-ports open the netdev as type system (type == NULL) when it doesn't
exists before it is opened normally, e.g from dumping the ports
in dpctl.

This solves 'ovs-dpctl show' EExists error on vxlan ports as both
(dpctl/tnl-ports) will open the ports as vxlan type.

Signed-off-by: Paul Blakey <[email protected]>
Reviewed-by: Roi Dayan <[email protected]>
---
 lib/tnl-ports.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tnl-ports.c b/lib/tnl-ports.c
index 70f6c3b..777ed4d 100644
--- a/lib/tnl-ports.c
+++ b/lib/tnl-ports.c
@@ -408,7 +408,7 @@ insert_ipdev(const char dev_name[])
     struct netdev *dev;
     int error, n_in6;
 
-    error = netdev_open(dev_name, NULL, &dev);
+    error = netdev_open(dev_name, netdev_get_type_from_name(dev_name), &dev);
     if (error) {
         return;
     }
-- 
2.7.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to