diff options
author | Hiroaki KAWAI <kawai@stratosphere.co.jp> | 2014-08-06 15:58:33 +0900 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-08-06 01:01:31 -0700 |
commit | 9a342b0c56467233cf75413dffb57f2818e86a81 (patch) | |
tree | d3bb2b812198aae507c7281e7b15a099ee9346ce | |
parent | 694575ad5aad7b21e9070995e1ed6dff0425fd51 (diff) | |
download | libpcap-9a342b0c56467233cf75413dffb57f2818e86a81.tar.gz |
Set nonblock for fd with mmap'ed read
With libpcap mmap'ed read on LInux, which would be the very
common case, even if we set pcap_setnonblock for that handle,
pcap_sendpacket will block.
-rw-r--r-- | pcap-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-linux.c b/pcap-linux.c index 48749c18..ce4c7528 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -4035,7 +4035,7 @@ pcap_setnonblock_mmap(pcap_t *p, int nonblock, char *errbuf) handlep->timeout = ~handlep->timeout; } } - return 0; + return pcap_setnonblock_fd(p, nonblock, errbuf); } static inline union thdr * |