<feed xmlns='http://www.w3.org/2005/Atom'>
<title>firewall4/root, branch master</title>
<subtitle>OpenWrt nftables firewall</subtitle>
<id>https://git.openwrt.org/project/firewall4/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/firewall4/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/'/>
<updated>2026-11-03T13:36:44Z</updated>
<entry>
<title>Revert "fw4: restart in a single nft transaction"</title>
<updated>2026-11-03T13:36:44Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2026-11-03T13:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=d961882bafe856240344f5856f5f6a39597aaf90'/>
<id>urn:sha1:d961882bafe856240344f5856f5f6a39597aaf90</id>
<content type='text'>
This reverts commit c22c2f241e9e99e93093ba8a8f49bb5a77a325b7.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>config: mark unsupported fw3 options correctly</title>
<updated>2026-11-02T23:57:55Z</updated>
<author>
<name>Andris PE</name>
</author>
<published>2025-05-23T17:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=358d42144b72ff29d39fd2ba52f7fc19fe43dd03'/>
<id>urn:sha1:358d42144b72ff29d39fd2ba52f7fc19fe43dd03</id>
<content type='text'>
- mark sysctl-based fw3 options UNSUPPORTED, emitting warning
- remove notion of unsupported option from default config file

No change in ruleset logic.

Signed-off-by: Andris PE &lt;neandris@gmail.com&gt;
</content>
</entry>
<entry>
<title>Set has_ports for helper rules and require helper port</title>
<updated>2026-11-02T23:49:14Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2024-11-27T01:03:20Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=a314df48644ec8f894f31141327f5522ad7c87f1'/>
<id>urn:sha1:a314df48644ec8f894f31141327f5522ad7c87f1</id>
<content type='text'>
Helper definitions are used to generate automatic `ct helper set` rules.
A helper without a port cannot produce a meaningful assignment rule, so
make `port` mandatory in `parse_helper()`. The generated helper rule now
also carries `has_ports: true`, which suppresses the redundant `meta
l4proto` match via the normal `has_ports` guard instead of special-casing
`set_helper` in the template. No behavior change for valid helpers.

Suggested-by: Andris PE &lt;neandris@gmail.com&gt;
[require helper port and set has_ports instead of special-casing set_helper]
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>templates: remove stray file</title>
<updated>2026-11-02T23:29:26Z</updated>
<author>
<name>Andris PE</name>
</author>
<published>2026-03-10T12:27:48Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=4b686774d2a7b23d86d134cfbd3304d6010d0a5e'/>
<id>urn:sha1:4b686774d2a7b23d86d134cfbd3304d6010d0a5e</id>
<content type='text'>
Fixes: https://github.com/openwrt/firewall4/issues/86
Signed-off-by: Andris PE &lt;neandris@gmail.com&gt;
</content>
</entry>
<entry>
<title>fw4: support multiple ipset references per rule and redirect</title>
<updated>2026-11-02T23:25:34Z</updated>
<author>
<name>Philipp Raschdorff</name>
</author>
<published>2026-10-17T20:01:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=7f34d9e0e6786174693d7bc6f9f9da05488ae5ae'/>
<id>urn:sha1:7f34d9e0e6786174693d7bc6f9f9da05488ae5ae</id>
<content type='text'>
The `list ipset` option has AND semantics: all listed references are AND-ed into one nft rule.

Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Signed-off-by: Philipp Raschdorff &lt;p.raschdorff@googlemail.com&gt;
[shorten comment]
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>fw4: reject unknown tokens in ipset references</title>
<updated>2026-11-02T23:15:59Z</updated>
<author>
<name>Philipp Raschdorff</name>
</author>
<published>2026-10-17T20:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=daf6cf607cab1efbefca5715c9f781979c3664ba'/>
<id>urn:sha1:daf6cf607cab1efbefca5715c9f781979c3664ba</id>
<content type='text'>
parse_setmatch() ignores every token after the set name that is not a
direction (`src`, `dst`, `dest`). `option ipset 'setA setB'` is
therefore accepted as a reference to setA only, and the rule silently
matches fewer conditions than configured. With list support for the
option this mistake becomes likely.

Reject the value if it has more than three tokens or a token that is
not a direction. An invalid value drops the section with the usual
"specifies invalid value" warning (fail-closed).

This is a behaviour change: a configuration that relied on unknown
tokens being ignored loses the affected rule after the update. For an
ACCEPT rule that closes access; for a DROP or REJECT rule it removes
the block, which is the opposite of fail-closed. Both cases are reported
with a warning, but nothing else draws attention to them. If that risk
is considered too high, the alternative is to keep accepting the
reference and only warn about the ignored tokens; this patch is
submitted separately so that it can be discussed and dropped on its
own.

Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Signed-off-by: Philipp Raschdorff &lt;p.raschdorff@googlemail.com&gt;
</content>
</entry>
<entry>
<title>fw4: add WDS ports to the flowtable by prefix</title>
<updated>2026-11-02T23:15:59Z</updated>
<author>
<name>Koral Ilgun</name>
</author>
<published>2026-10-21T00:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=296ddab860a104db08016100c109adda069e4abc'/>
<id>urn:sha1:296ddab860a104db08016100c109adda069e4abc</id>
<content type='text'>
fw4 reads the bridge members from sysfs when it renders the ruleset
and lists each member by name in the hardware offload flowtable.
hostapd creates the port of a 4-address station as &lt;bss&gt;.sta&lt;aid&gt;
when the station associates. A port that comes up after the last
reload under a name that was not in use then joins the bridge, but
not the flowtable, and its upload takes the slow path until the
next reload.

The kernel binds a flowtable hook with a name prefix to each device
that registers later under a matching name, the hardware block
included. So list &lt;member&gt;.sta* for each wireless member and drop
the port names, because the kernel refuses a list that holds a
prefix and a name under it. Each wireless member gets the prefix,
also one without a port at the time of the render, because the
reloads at boot run before the first station associates.

A name prefix in a flowtable needs the NFTA_DEVICE_PREFIX attribute
of Linux 6.17, which nftables 1.1.6 and later send. An older kernel
refuses it, so the check of hardware offload would fail and fw4 would
fall back to software offloading. So fw4 uses the prefix only on
Linux 6.17 and later, and lists the port names as before on an older
kernel. Software offloading lists the zone devices and does not
change.

Signed-off-by: Koral Ilgun &lt;koral.ilgun@adtran.com&gt;
</content>
</entry>
<entry>
<title>fw4: restart in a single nft transaction</title>
<updated>2026-11-02T23:15:59Z</updated>
<author>
<name>Pierre-Yves Le Borgne</name>
</author>
<published>2026-10-17T01:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=c22c2f241e9e99e93093ba8a8f49bb5a77a325b7'/>
<id>urn:sha1:c22c2f241e9e99e93093ba8a8f49bb5a77a325b7</id>
<content type='text'>
"fw4 restart" deleted the fw4 table, then rendered and loaded the
ruleset again, in two nft runs. In between there was no fw4 table: no
filtering and no NAT. The replies of established masqueraded
connections were then no longer translated back, arrived for the
router's own address and were answered with resets. The LAN host
waiting for them is never told, so a download through the router hangs
until the application gives up. Packets forwarded in that window were
not filtered either.

Delete the table and load the new ruleset in one nft transaction
instead. The old ruleset stays in force until the new one replaces it,
and unlike a reload the restart still removes everything that is not in
the new ruleset.

Tested on an x86_64 router with kernel 6.18 and a TCP download through
a masqueraded interface: "fw4 restart" made the router send 8 resets
and the download never resumed. With this change there is no reset and
no gap, a chain and a set added by hand are gone after the restart, and
a restart of a stopped firewall loads it.

Assisted-by: Claude Code (Claude Opus 5.5)
Signed-off-by: Pierre-Yves Le Borgne &lt;pylaterreur@gmail.com&gt;
</content>
</entry>
<entry>
<title>ruleset: Add snat_port support for MASQUERADE</title>
<updated>2026-11-02T23:15:59Z</updated>
<author>
<name>HSXX</name>
</author>
<published>2025-10-21T11:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=5474da96eb4432c363768a8b254a2a088acf8b9f'/>
<id>urn:sha1:5474da96eb4432c363768a8b254a2a088acf8b9f</id>
<content type='text'>
Currently, MASQUERADE in firewall4 does not support setting snat_port and directly reports an error without creating rules. This modification enables MASQUERADE to support setting snat_port.

Signed-off-by: HSXX &lt;513733973@qq.com&gt;
[folded fix: keep the masquerade branch alongside the npt prefix_map branch]
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>ruleset: avoid no-op port translation in dnat</title>
<updated>2026-11-02T23:15:59Z</updated>
<author>
<name>Andris PE</name>
</author>
<published>2025-10-17T11:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=613198bebd0b6e24b98bb9f8d39c7e12f7ceac0f'/>
<id>urn:sha1:613198bebd0b6e24b98bb9f8d39c7e12f7ceac0f</id>
<content type='text'>
Correct rport null propagation
 moving compensatory conditional to reflection snat rule only.
Emit shorthand rules if user did not specify redirect target port
This saves 2 bytecodes in rule and kernel does not do no-op port
rewrite.
V2 Adjust tests to cover more cases/code paths
V3 Adjust uci example to reflect default of not changing dport

Signed-off-by: Andris PE &lt;neandris@gmail.com&gt;
[folded fix: merge redirect test expectations with #104 and update ubus reflection expectations]
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
</feed>
