aboutsummaryrefslogtreecommitdiff
path: root/lib
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:46:00 -0800
commitcf1bc453f694046dabfdfc290bbe3ef043f2071f (patch)
treeb5b1c88d65f596725547d91a7111cdfbe0835109 /lib
parente633f0b4f7dfd7f122fff2d25c1854dc69be0e99 (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')
-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);