mirror of
https://github.com/openvswitch/ovs
synced 2025-09-03 15:55:19 +00:00
netlink-socket: return correct error code when connect fails
When connect and other calls fail after get_socket_rcvbuf, the return code would be the rcvbuf size, not errno from the last call. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
committed by
Simon Horman
parent
d5579e4808
commit
2e46795083
@@ -195,6 +195,7 @@ nl_sock_create(int protocol, struct nl_sock **sockp)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
sock->rcvbuf = retval;
|
sock->rcvbuf = retval;
|
||||||
|
retval = 0;
|
||||||
|
|
||||||
/* Connect to kernel (pid 0) as remote address. */
|
/* Connect to kernel (pid 0) as remote address. */
|
||||||
memset(&remote, 0, sizeof remote);
|
memset(&remote, 0, sizeof remote);
|
||||||
|
Reference in New Issue
Block a user