🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #5835

Bug#1148882: ferm: ferm-early needs support for DHCPv6

#5835
From: Marc Haber
Date: Mon, 23 Nov 2026 20:10
89 lines
6385 bytes
On Thu, Nov 19, 2026 at 12:28:59AM +0100, David Härdeman wrote:
> On Wed, Nov 18, 2026 at 06:20:40PM +0100, Marc Haber wrote:
> >On Wed, Nov 18, 2026 at 12:47:16AM +0100, David Härdeman wrote:
> >> First, there's a typo in debian/ferm.conf; line 50 adds a superfluous "}".
> >
> >Ouch, bad mistake. I'm going to write an autopkgtest that finds that. 
> >There are chances that this test already exists and I was just oo stupid 
> >to run it.

No, that test didn't exist, it now does (in a branch).

> >I consider that a bug in ferm and will draft a patch that makes 
> >multiple @subchain commands idempotent. Otherwise, a change in the 
> >dual-stack part of the rule will probably cause a corollary error in one 
> >of the single-stack stanzas and I'd like to avoid that - especially when 
> >this happens in more complex rule sets where the two instances of 
> >@subchain foo might be in entirely different parts of the rule set.
> 
> I think it might be better not to...imagine things like (pseudocode):
> 
> 	interface X + @subchain A { ALLOW };
> 	...
> 	interface Y + @subchain A { if FOO then BAR };
> 
> vs:
> 
> 	interface Y + @subchain A { if FOO then BAR };
> 	...
> 	interface X + @subchain A { ALLOW };
> 
> IOW...I think it might be a world of pain....and (given that ferm
> upstream seems moribound), you'd have to carry that forever. So
> current behaviour + warn seems like the sane thing to do.

I think you're right, but this is just a decision between wrong and 
wrong.

> >> *However*, my quick and dirty test was perhaps a bit too quick and
> >> dirty.  I just copied one file from your zg/icmpv6 branch
> >> (debian/ferm-early.conf). I've tried the whole thing now and there's two
> >> issue.
> >> 
> >
> >The use case of two identically named but differnt subchains is 
> >possible, but was unsupported before. Would you like to have ferm issue 
> >a warning in this case or not?
> >
> >Having a warning for two @subchain foo statements will expose unwanted 
> >behavior if the doubled use of the subchain was unintended, but it will 
> >generate a warning if the identically named subchain was actually 
> >intended to be the same chain. Warning or not?
> 
> I think a warning is the sane default. What else? Error...for a
> firewall, what does "error" mean? Stop loading rules? I think it's
> reasonable to just focus on the shipped rules being sane, and then
> people have to take responsibility for their own local stuff...

Just continue as far as it is possible. Erroring out is a good thing for 
rebuilding an existing rule set (in which case the old rule set stays 
active), but for initialization that is bad. But otoh we have an easy 
and hopefully quite static early rule set, that can stay in place if 
building the "real" rule set fails, and if the early rule set errors out 
I personally make sure on my machine that it stays without packet filter 
but also without routing function and with only sshd running.

> Turning to the rules in the package itself, writing the per-domain parts
> as plain "chain INPUT-early" blocks avoids the issue entirely, since
> that appends to the chain without adding a jump:
> 
>   domain ip table filter chain INPUT-early {
>       # allow all ICMP
>       proto icmp ACCEPT;
>   }
> 
>   domain ip6 table filter chain INPUT-early {
>       # allow all ICMPv6
>       proto ipv6-icmp ACCEPT;
> 
>       # allow DHCPv6
>       proto udp saddr fe80::/10 sport 547 dport 546 ACCEPT;
>   }

That triggers warnings as well. And I am not particularly fond of having 
just another ordering issue in the rule set. Otoh, we're putting gold 
plating on a package I originally intended to barely keep alive untli I 
am ready to migrate to nft+wrapper myself.

Greetings
Marc
Technical Details
Message-ID: <O2Iwp-dJDa-11@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <NGUbf-1yx9-1@gated-at.bofh.it> <NLxQJ-44fb-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <NSaZ7-7PIx-145@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0BfH-cy2f-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0RDP-cJ2E-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0XpT-cMb8-5@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0XpT-cMb8-5@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Marc Haber <mh+debian-packages@zugschlus.de>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1148882: ferm: ferm-early needs support for DHCPv6
Date: Mon, 23 Nov 2026 21:10:01 +0100
Message-ID: <O2Iwp-dJDa-11@gated-at.bofh.it>
References: <NGUbf-1yx9-1@gated-at.bofh.it> <NLxQJ-44fb-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <NSaZ7-7PIx-145@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0BfH-cy2f-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0RDP-cJ2E-1@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0XpT-cMb8-5@gated-at.bofh.it> <NGUbf-1yx9-1@gated-at.bofh.it> <O0XpT-cMb8-5@gated-at.bofh.it>
X-Original-To: David Härdeman <david@hardeman.nu>,
	1148882@bugs.debian.org, 1148882-submitter@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Mon Nov 23 20:01:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.651
Reply-To: Marc Haber <mh+debian-packages@zugschlus.de>, 1148882@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: ferm@packages.debian.org
X-Debian-Pr-Message: followup 1148882
X-Debian-Pr-Package: ferm
X-Debian-Pr-Keywords: ipv6
X-Debian-Pr-Source: ferm
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/2.4.1 (2026-07-04)
X-Crossassassin-Score: 2
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2004538
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 89
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 23 Nov 2026 20:58:41 +0100
X-Original-Message-ID: <awSa8Y2-21chRKhu@192.168.77.35>
X-Original-References: <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <bcfa78e4-6afb-4942-8cd0-25509b168796@hardeman.nu> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <at4ua82uqmJw-2FF@192.168.77.35> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <avznhBVSciFaseg6@hardeman.nu> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <av3eaMwW--b8B6K_@192.168.77.35> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <av40uy8eyG4IoQPy@hardeman.nu> <eaad3ef2-feab-4ad8-ab73-fe1dddb00f45@hardeman.nu> <av40uy8eyG4IoQPy@hardeman.nu>