diff mbox

[conntrack-tools] conntrack: flush stdout for each expectation event, too

Message ID 1337341009-15287-1-git-send-email-fw@strlen.de
State Accepted
Headers show

Commit Message

Florian Westphal May 18, 2012, 11:36 a.m. UTC
else, piping "conntrack -E expect" output will be buffered/delayed,
which is not what users expect. Normal conntrack events are already
flushed.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 src/conntrack.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Pablo Neira Ayuso May 20, 2012, 8:21 p.m. UTC | #1
On Fri, May 18, 2012 at 01:36:49PM +0200, Florian Westphal wrote:
> else, piping "conntrack -E expect" output will be buffered/delayed,
> which is not what users expect. Normal conntrack events are already
> flushed.

applied, thanks Florian.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/conntrack.c b/src/conntrack.c
index b065211..0920bc5 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -1380,6 +1380,7 @@  static int event_exp_cb(enum nf_conntrack_msg_type type,
 
 	nfexp_snprintf(buf,sizeof(buf), exp, type, op_type, op_flags);
 	printf("%s\n", buf);
+	fflush(stdout);
 	counter++;
 
 	return NFCT_CB_CONTINUE;