From patchwork Tue Jul 16 12:28:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 1961081 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nwl.cc header.i=@nwl.cc header.a=rsa-sha256 header.s=mail2022 header.b=PN1DAlWQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org; envelope-from=netfilter-devel+bounces-3007-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WNddt1Y3jz1xrK for ; Tue, 16 Jul 2024 22:28:34 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EF046B22ADE for ; Tue, 16 Jul 2024 12:28:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B7DD19AA40; Tue, 16 Jul 2024 12:28:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nwl.cc header.i=@nwl.cc header.b="PN1DAlWQ" X-Original-To: netfilter-devel@vger.kernel.org Received: from orbyte.nwl.cc (orbyte.nwl.cc [151.80.46.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F0F219A868 for ; Tue, 16 Jul 2024 12:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=151.80.46.58 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721132897; cv=none; b=jto8xN6VFoka+M4C9cX03+IpGKCmXJbXrV3GAzFjcYGFt3YjzRjzyu5Z8BiHKaM1BItAOyUeprcRNRmqn49nUvkpW+OWRUNZh8pJlBmM+dMVvnwUjgOka9Qop3WUx/w6MsRuI53JZjis0XmxrsokXxX44Zok8l6Lt0SyvYVZyiQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721132897; c=relaxed/simple; bh=bo6wr9YP4QPIZLTgbKkXlZ0OLVHtyHWFCztyvgDGDgU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e9ZtM0qcrxlBttlu2Qzth0ZsIVZ/wsWgq2vB/+70wwzPYpnuCWl8r9RQMg35pURXGRYVUiHOzJm6UQlRHfdaTXf0OVtFWUKKFTCtkuwAVRL/lDLf17tBWUmgyaVqtX5chLWOukf1Vm/30X2c1qTnpFAks4pHdrdy8uGnOPgL9tI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nwl.cc; spf=pass smtp.mailfrom=nwl.cc; dkim=pass (2048-bit key) header.d=nwl.cc header.i=@nwl.cc header.b=PN1DAlWQ; arc=none smtp.client-ip=151.80.46.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nwl.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nwl.cc DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nwl.cc; s=mail2022; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9eyUAiMqk4xoVRapzFGKh2QXm3/etW3wnSc7MCFlEdQ=; b=PN1DAlWQwTx0r7wXNNXf6QDnn3 0EtpcYJEEDTQ2Iydsw8858ke/X4p1N9HW5s1/o1+CfnnA2DIJzyEw74EAKhTEJD4LsOO6rfi8ZUOE Qly5d7mUENPwS7fCTTvJgsZdk2rUv63aML220Lf48CU+m+wpkTzgEhFlcfjU+jbBdxF5omrxyFy90 EPvc5LduZq6c2lpaKpgco/2u6RfJYHXKdm+8cbSHcNWzEK2mTg5w2SsI1nvOKmtm/hdgcUVBnYqwc aZSIJGw8trPQKT/O0CnTljtgwmI1Cg97logNl20riDkiHwfI8BUQQfmIc2EtPn/X1t5q1qdS6dkGQ /KYpQ6Yw==; Received: from localhost ([::1] helo=xic) by orbyte.nwl.cc with esmtp (Exim 4.97.1) (envelope-from ) id 1sThHy-000000007tp-3iUm; Tue, 16 Jul 2024 14:28:14 +0200 From: Phil Sutter To: netfilter-devel@vger.kernel.org Cc: Florian Westphal , Pablo Neira Ayuso Subject: [iptables PATCH 4/8] xtables-monitor: Support arptables chain events Date: Tue, 16 Jul 2024 14:28:01 +0200 Message-ID: <20240716122805.22331-5-phil@nwl.cc> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240716122805.22331-1-phil@nwl.cc> References: <20240716122805.22331-1-phil@nwl.cc> Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Print arptables NEWCHAIN/DELCHAIN events just like for iptables, using the '-0' prefix rule callback already uses. Signed-off-by: Phil Sutter --- iptables/xtables-monitor.c | 3 +++ 1 file changed, 3 insertions(+) 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",