A negative 'sock' means there was an error but netdev_linux_send() returns
a positive errno value on error.

Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 lib/netdev-linux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 4ea7a36..c0e0c40 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);
-- 
1.7.2.5

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

Reply via email to