On Wed, Nov 18, 2026 at 12:47:16AM +0100, David Härdeman wrote:
> *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.
>
> 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.
> Second, in debian/ferm-early.conf, every "interface + @subchain INPUT-early {
> ... }"
> adds two rules, a jump in INPUT to INPUT-early and then the actual rule(s) in
> INPUT-early. That results in duplicated jumps in INPUT (can be seen
> with "ferm --noexec --lines"), e.g.:
>
> -A INPUT --in-interface + --jump INPUT-early
> -A INPUT --in-interface + --jump INPUT-early
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.
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?
Greetings
Marc