Skip to contentSkip to conversation

monitor: do not print generation ID with --echo

PATCH New Pablo Neira Ayuso 1 participant 1 message Oct 20, 2020 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 monitor: do not print generation ID with --echo

This fixes testcases/sets/0036add_set_element_expiration_0

---
 src/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/monitor.c +1 -1
index 3872ebcfbdaf..9e508f8f7574 100644
@@ -849,7 +849,7 @@ static int netlink_events_newgen_cb(const struct nlmsghdr *nlh, int type,
 			break;
 		}
 	}
-	if (genid >= 0) {
+	if (!nft_output_echo(&monh->ctx->nft->output) && genid >= 0) {
 		nft_mon_print(monh, "# new generation %d", genid);
 		if (pid >= 0)
 			nft_mon_print(monh, " by process %d (%s)", pid, name);
Signature · 1 line
2.20.1