diff mbox series

[iptables,4/8] xtables-monitor: Support arptables chain events

Message ID 20240716122805.22331-5-phil@nwl.cc
State Accepted
Headers show
Series Fix xtables-monitor rule printing, partially RFC | expand

Commit Message

Phil Sutter July 16, 2024, 12:28 p.m. UTC
Print arptables NEWCHAIN/DELCHAIN events just like for iptables, using
the '-0' prefix rule callback already uses.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 iptables/xtables-monitor.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/iptables/xtables-monitor.c b/iptables/xtables-monitor.c
index e136e9b722e92..714a2dfd7074a 100644
--- a/iptables/xtables-monitor.c
+++ b/iptables/xtables-monitor.c
@@ -151,6 +151,9 @@  static int chain_cb(const struct nlmsghdr *nlh, void *data)
 	case NFPROTO_IPV6:
 		family = 6;
 		break;
+	case NFPROTO_ARP:
+		family = 0;
+		break;
 	default:
 		nftnl_chain_snprintf(buf, sizeof(buf), c, NFTNL_OUTPUT_DEFAULT, 0);
 		printf("nft: %s chain: %s\n",