From: Ben Pfaff Date: Tue, 26 Feb 2013 20:35:40 +0000 (-0800) Subject: netdev-linux: Fix netdev_linux_send() return value in corner case. X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c4c7a3d7a1c278548c92e5d317e4be4a8525f8c7;p=ovs.git netdev-linux: Fix netdev_linux_send() return value in corner case. A negative 'sock' means there was an error but netdev_linux_send() returns a positive errno value on error. Signed-off-by: Ben Pfaff --- diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 4ea7a3667..c0e0c40c5 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -916,7 +916,7 @@ netdev_linux_send(struct netdev *netdev_, const void *data, size_t size) sock = af_packet_sock(); if (sock < 0) { - return sock; + return -sock; } error = get_ifindex(netdev_, &ifindex);