2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

dpif-netlink: Fix error behavior in dpif_netlink_port_add__().

Until now, the code here would report an error to its caller as success.
This fixes the problem.

Found by inspection.

Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ben Pfaff
2018-11-15 09:08:18 -08:00
parent 33a3ee6b39
commit 713a45dbd5

View File

@@ -716,7 +716,8 @@ dpif_netlink_port_add__(struct dpif_netlink *dpif, const char *name,
int error = 0;
if (dpif->handlers) {
if (nl_sock_create(NETLINK_GENERIC, &socksp)) {
error = nl_sock_create(NETLINK_GENERIC, &socksp);
if (error) {
return error;
}
}