diff options
| author | Phil Sutter <phil@nwl.cc> | 2025-08-29 01:07:05 +0200 |
|---|---|---|
| committer | Phil Sutter <phil@nwl.cc> | 2025-09-11 18:03:02 +0200 |
| commit | 6c04d24d16f1d15f216f2b3c8e64c9062cd77487 (patch) | |
| tree | 477c14c3523da0504db224655029bd0814f787c9 /src/monitor.c | |
| parent | 2214a4836bc7c906dd1d16a21a59b9d9240af7b7 (diff) | |
monitor: Inform JSON printer when reporting an object delete event
Since kernel commit a1050dd07168 ("netfilter: nf_tables: Reintroduce
shortened deletion notifications"), type-specific data is no longer
dumped when notifying for a deleted object. JSON output was not aware of
this and tried to print bogus data.
Fixes: 9e88aae28e9f4 ("monitor: Use libnftables JSON output")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/monitor.c')
| -rw-r--r-- | src/monitor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/monitor.c b/src/monitor.c index e58f6225..fafeeebe 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -549,7 +549,7 @@ static int netlink_events_obj_cb(const struct nlmsghdr *nlh, int type, nft_mon_print(monh, "\n"); break; case NFTNL_OUTPUT_JSON: - monitor_print_obj_json(monh, cmd, obj); + monitor_print_obj_json(monh, cmd, obj, type == NFT_MSG_DELOBJ); if (!nft_output_echo(&monh->ctx->nft->output)) nft_mon_print(monh, "\n"); break; |
