]> git.proxmox.com Git - ovs.git/commitdiff
dpif-netlink: Handle netlink errors on port del.
authorEric Garver <e@erig.me>
Wed, 12 Apr 2017 20:11:18 +0000 (13:11 -0700)
committerJoe Stringer <joe@ovn.org>
Wed, 12 Apr 2017 20:24:09 +0000 (13:24 -0700)
The return code of dpif_netlink_port_query__() was not being checked.

Fixes: da467899ab6e ("Windows: Add internal switch port per OVS bridge")
Signed-off-by: Eric Garver <e@erig.me>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
lib/dpif-netlink.c

index e0acf5cce3cfef47196956b0ab1c1cda709e74f2..e27524754a056a3b58e625945efcdc508626e284 100644 (file)
@@ -956,7 +956,11 @@ dpif_netlink_port_del__(struct dpif_netlink *dpif, odp_port_t port_no)
     vport.port_no = port_no;
 #ifdef _WIN32
     struct dpif_port temp_dpif_port;
-    dpif_netlink_port_query__(dpif, port_no, NULL, &temp_dpif_port);
+
+    error = dpif_netlink_port_query__(dpif, port_no, NULL, &temp_dpif_port);
+    if (error) {
+        return error;
+    }
     if (!strcmp(temp_dpif_port.type, "internal")) {
         if (!delete_wmi_port(temp_dpif_port.name)){
             VLOG_ERR("Could not delete wmi port with name: %s",