From: Ben Pfaff Date: Fri, 8 Apr 2011 21:23:13 +0000 (-0700) Subject: netdev-linux: Fix blocking while sending packets. X-Git-Tag: v1.2.0~473 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b981622b84c7832adbaa3dffbe3d3d115f225926;p=sliver-openvswitch.git netdev-linux: Fix blocking while sending packets. The AF_PACKET socket needs to be in nonblocking mode or trying to send a packet can take a long time. --- diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 1aa909345..50bec0887 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -452,6 +452,7 @@ netdev_linux_init(void) VLOG_ERR("failed to create packet socket: %s", strerror(status)); } + set_nonblocking(af_packet_sock); } /* Create rtnetlink socket. */