projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5579e4
)
netlink-socket: return correct error code when connect fails
author
Thadeu Lima de Souza Cascardo
<cascardo@redhat.com>
Mon, 15 Feb 2016 17:13:30 +0000
(15:13 -0200)
committer
Simon Horman
<simon.horman@netronome.com>
Tue, 16 Feb 2016 02:26:39 +0000
(11:26 +0900)
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>
lib/netlink-socket.c
patch
|
blob
|
history
diff --git
a/lib/netlink-socket.c
b/lib/netlink-socket.c
index
5ef4b15
..
0cedb41
100644
(file)
--- a/
lib/netlink-socket.c
+++ b/
lib/netlink-socket.c
@@
-195,6
+195,7
@@
nl_sock_create(int protocol, struct nl_sock **sockp)
goto error;
}
sock->rcvbuf = retval;
+ retval = 0;
/* Connect to kernel (pid 0) as remote address. */
memset(&remote, 0, sizeof remote);