]> git.ipfire.org Git - thirdparty/iptables.git/commit
xtables-monitor: Flush stdout after all lines of output
authorPhil Sutter <phil@nwl.cc>
Fri, 12 Jul 2024 11:03:18 +0000 (13:03 +0200)
committerPhil Sutter <phil@nwl.cc>
Sat, 27 Jul 2024 12:32:39 +0000 (14:32 +0200)
commit69da16a7790048a176a44530eb57e4b60184ce6e
tree094e2a437aa8d22d9d273dfc5a656940648df544
parenta5e7f9d14ee404544e2751232e69f993b16e7396
xtables-monitor: Flush stdout after all lines of output

Writing an xtables-monitor testsuite is pretty much impossible without
this due to unreliable output flushing. Just move the fflush() call from
trace_cb() to its caller so monitor events benefit from it as well.

Fixes: 07af4da52ab30 ("xtables-monitor: fix rule printing")
Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/xtables-monitor.c