mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
netlink-socket: Fix sign of error code.
Commit 8f20fd98db
(netlink-socket: Work around upstream kernel Netlink
bug.) got the sign of the error code wrong, so that it reported e.g. -22
for EINVAL to nl_sock_recv__()'s caller, instead of 22.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
This commit is contained in:
@@ -338,7 +338,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, bool wait)
|
||||
error = (retval < 0 ? errno
|
||||
: retval == 0 ? ECONNRESET /* not possible? */
|
||||
: nlmsghdr->nlmsg_len != UINT32_MAX ? 0
|
||||
: -retval);
|
||||
: retval);
|
||||
} while (error == EINTR);
|
||||
if (error) {
|
||||
if (error == ENOBUFS) {
|
||||
|
Reference in New Issue
Block a user