aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-linux.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-02-26 12:35:40 -0800
committerBen Pfaff <blp@nicira.com>2013-02-28 10:40:57 -0800
commitc4c7a3d7a1c278548c92e5d317e4be4a8525f8c7 (patch)
treef14abf2b0f4cb5d91a62782f3af99e3a502e04ee /lib/netdev-linux.c
parentc93f303add6046fa583477e0c0749fded42e6068 (diff)
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 <blp@nicira.com>
Diffstat (limited to 'lib/netdev-linux.c')
-rw-r--r--lib/netdev-linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 4ea7a366..c0e0c40c 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);