summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-11-05 15:35:55 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-11-05 15:35:55 +0000
commit5bc4980a37c3b116a6219f02fa500fa8dcb06260 (patch)
tree12bcadf8e846fb4b5d007676f176eb9d92c816af
parent205405c0294355754b3b4b0164b7fac69658739e (diff)
downloadlibnfnetlink-5bc4980a37c3b116a6219f02fa500fa8dcb06260.tar.gz
handle EAGAIN in case the socket is nonblocking
-rw-r--r--src/libnfnetlink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c
index a63f799..f6c0421 100644
--- a/src/libnfnetlink.c
+++ b/src/libnfnetlink.c
@@ -306,9 +306,11 @@ int nfnl_listen(struct nfnl_handle *nfnlh,
if (errno == EINTR)
continue;
/* Bad file descriptor */
- if (errno == EBADF)
+ else if (errno == EBADF)
break;
- nfnl_error("recvmsg overrun");
+ else if (errno == EAGAIN)
+ break;
+ nfnl_error("recvmsg overrun: %s", strerror(errno));
continue;
}
if (remain == 0) {