summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-07-27 01:24:51 +0300
committerTobias Klauser <tklauser@distanz.ch>2015-07-27 11:48:16 +0200
commit63d26c48e9c1d486efd24eda4b3a65066f315234 (patch)
tree1146b067f2167fa374dbdd58ae1dd404f2e64e6a
parent115ac442812928e1ae0682aca5f1d0cbb77d92cf (diff)
flowtop: Fix missing new connections after flush
There might be new fast connection between flush & handling new events which can be not handled, so put flushing connections before loop. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--flowtop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/flowtop.c b/flowtop.c
index 6844402..6466b47 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -1134,8 +1134,6 @@ static void *collector(void *null __maybe_unused)
struct pollfd poll_fd[1];
int ret;
- collector_flush();
-
ct_event = nfct_open(CONNTRACK, NF_NETLINK_CONNTRACK_NEW |
NF_NETLINK_CONNTRACK_UPDATE |
NF_NETLINK_CONNTRACK_DESTROY);
@@ -1199,6 +1197,8 @@ static void *collector(void *null __maybe_unused)
panic("Cannot set non-blocking socket: fcntl(): %s\n",
strerror(errno));
+ collector_flush();
+
rcu_register_thread();
while (!sigint && ret >= 0) {