From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 142551FF09B for ; Mon, 12 Oct 2026 11:40:33 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2875A21488; Mon, 12 Oct 2026 11:40:23 +0200 (CEST) From: Arthur Bied-Charreton To: pve-devel@lists.proxmox.com Subject: [PATCH pve-firewall 0/2] ebtables: fix ARP filter for alias and nomatch ipfilter entries Date: Mon, 12 Oct 2026 11:38:06 +0200 Message-ID: <20261012093956.285433-1-a.bied-charreton@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791798016685 X-SPAM-LEVEL: Spam detection results: 0 AWL 1.028 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: N4AYCKFX5MAB7EPXDCVMY7DGYT6FLU6X X-Message-ID-Hash: N4AYCKFX5MAB7EPXDCVMY7DGYT6FLU6X X-MailFrom: a.bied-charreton@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Following this forum post [0], I looked into what might be generating the value does not look like a valid IP address or CIDR network log lines, which show up once per affected guest on every update cycle. When building the ARP filter from an ipfilter-netX ipset, entries were passed verbatim to parse_ip_or_cidr(), so an alias entry, or one the parser already flagged as invalid, makes it die. The error aborts the whole guest in compile_ebtables_filter(), so the guest ends up with no ebtables rules at all. Before bbd02dae ("firewall: log compilation errors in syslog"), the error went to warn(), which the daemon ignores, so the layer-2 filter was missing silently. Patch 1 resolves entries the same way generate_ipset_chains() does, skips entries the parser errored on, and logs errors per entry with more context to make debugging easier. While looking into this, I also noticed that nomatch entries were added to the ARP filter as allowed sources. Patch 2 emits DROP for them to honor nomatch. [0] https://forum.proxmox.com/threads/pve-firewall-log-value-does-not-look-like-a-valid-ip-address-or-cidr-network.186990/#post-872700 Arthur Bied-Charreton (2): firewall: ebtables: resolve aliases in ipfilter ipsets firewall: ebtables: honor nomatch in ipfilter ipsets src/PVE/Firewall.pm | 86 +++++++++++++------- src/test/Makefile | 2 +- src/test/test_ebtables_ipfilter.pl | 123 +++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+), 28 deletions(-) create mode 100755 src/test/test_ebtables_ipfilter.pl -- 2.47.3