diff options
author | Paul Blakey <paulb@mellanox.com> | 2017-08-02 14:17:29 +0300 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-08-03 13:06:36 -0700 |
commit | 493e0550a37cd0efac299ad5f643ee3e8eb354bf (patch) | |
tree | 424b8d17c3d7b84b806ba22b3ee9bb9db88d2847 /lib | |
parent | 8c1e74d1c8e3aeb74b676da45ff0b04021083c35 (diff) | |
download | openvswitch-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')
-rw-r--r-- | lib/tnl-ports.c | 2 |
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; } |