netdev-vport: don't use system type when opening netdev
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Fri, 8 Jul 2016 17:52:01 +0000 (14:52 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Wed, 27 Jul 2016 12:05:58 +0000 (09:05 -0300)
tunnel_check_status_change__ calls netdev_open with type system. Using NULL
instead will default to system in case the device is not opened yet, and allow a
different type in case it's already opened.

Any type should be fine, as netdev_get_carrier will work with any of them.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
lib/netdev-vport.c

index 83a795c..87a30f8 100644 (file)
@@ -274,7 +274,7 @@ tunnel_check_status_change__(struct netdev_vport *netdev)
     if (ovs_router_lookup(route, iface, NULL, &gw)) {
         struct netdev *egress_netdev;
 
-        if (!netdev_open(iface, "system", &egress_netdev)) {
+        if (!netdev_open(iface, NULL, &egress_netdev)) {
             status = netdev_get_carrier(egress_netdev);
             netdev_close(egress_netdev);
         }