summaryrefslogtreecommitdiff
path: root/lib/tnl-ports.c
diff options
context:
space:
mode:
authorPaul Blakey <paulb@mellanox.com>2017-08-02 14:17:29 +0300
committerBen Pfaff <blp@ovn.org>2017-08-03 13:06:36 -0700
commit493e0550a37cd0efac299ad5f643ee3e8eb354bf (patch)
tree424b8d17c3d7b84b806ba22b3ee9bb9db88d2847 /lib/tnl-ports.c
parent8c1e74d1c8e3aeb74b676da45ff0b04021083c35 (diff)
downloadopenvswitch-493e0550a37cd0efac299ad5f643ee3e8eb354bf.tar.gz
tnl-ports: Open tunnel type if device name has special prefix
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 <paulb@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/tnl-ports.c')
-rw-r--r--lib/tnl-ports.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tnl-ports.c b/lib/tnl-ports.c
index 70f6c3b6d..777ed4d61 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;
}