netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft 1/2] netlink: flush stdout after each event in monitor mode
@ 2015-09-04 16:53 Pablo Neira Ayuso
  2015-09-04 16:53 ` [PATCH nft 2/2] mnl: rework netlink socket event receive path Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-09-04 16:53 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kaber, fw, arturo.borrero.glez

So we get all events when redirecting them to file, ie.

	# nftables monitor > file

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/netlink.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/netlink.c b/src/netlink.c
index a905009..4371c0a 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -2143,6 +2143,7 @@ static int netlink_events_cb(const struct nlmsghdr *nlh, void *data)
 		ret = netlink_events_rule_cb(nlh, type, monh);
 		break;
 	}
+	fflush(stdout);
 
 	return ret;
 }
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-04 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 16:53 [PATCH nft 1/2] netlink: flush stdout after each event in monitor mode Pablo Neira Ayuso
2015-09-04 16:53 ` [PATCH nft 2/2] mnl: rework netlink socket event receive path Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).