Skip to content

Commit

Permalink
dpif-netlink: Handle netlink errors on port del.
Browse files Browse the repository at this point in the history
The return code of dpif_netlink_port_query__() was not being checked.

Fixes: da46789 ("Windows: Add internal switch port per OVS bridge")
Signed-off-by: Eric Garver <[email protected]>
Acked-by: Alin Gabriel Serdean <[email protected]>
Signed-off-by: Joe Stringer <[email protected]>
  • Loading branch information
erig0 authored and joestringer committed Apr 12, 2017
1 parent de5739e commit 933228b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/dpif-netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 933228b

Please sign in to comment.