summaryrefslogtreecommitdiff
path: root/src/udp.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-07-19 15:31:25 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-07-19 15:31:25 +0200
commit4694ae1e0939f69f4d2696b0caff62ce6a17d92f (patch)
treef0bef91fab2792c0e653ef38293642b812ff51f6 /src/udp.c
parent651794575c844fe25a717d77bd088c51383067f0 (diff)
downloadconntrack-tools-4694ae1e0939f69f4d2696b0caff62ce6a17d92f.tar.gz
conntrack-tools-4694ae1e0939f69f4d2696b0caff62ce6a17d92f.zip
conntrackd: improve handling of external messages
With this patch, a) we set the file descriptors for the synchronization channels as non-blocking, b) we perform more than one recv() call per select() signal on the socket and c) we limit the iteration to the value that EventIterationLimit has set. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/udp.c')
-rw-r--r--src/udp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udp.c b/src/udp.c
index d9943a0..4b9eb80 100644
--- a/src/udp.c
+++ b/src/udp.c
@@ -198,7 +198,8 @@ ssize_t udp_recv(struct udp_sock *m, void *data, int size)
(struct sockaddr *)&m->addr,
&sin_size);
if (ret == -1) {
- m->stats.error++;
+ if (errno != EAGAIN)
+ m->stats.error++;
return ret;
}