From b981622b84c7832adbaa3dffbe3d3d115f225926 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 8 Apr 2011 14:23:13 -0700 Subject: [PATCH] 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. --- lib/netdev-linux.c | 1 + 1 file changed, 1 insertion(+) 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. */ -- 2.43.0