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 <casca...@redhat.com>
---
 lib/netlink-socket.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index 5ef4b15..0cedb41 100644
--- 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);
-- 
2.5.0

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to