[ovs-dev] [RFC 3/5] netdev-vport: don't use system type when opening netdev

Thadeu Lima de Souza Cascardo cascardo at redhat.com
Mon Jul 18 17:00:23 UTC 2016


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.
---
 lib/netdev-vport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 83a795c..87a30f8 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -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);
         }
-- 
2.7.4




More information about the dev mailing list