<feed xmlns='http://www.w3.org/2005/Atom'>
<title>firewall4/tests/03_rules/18_ipset_mixed_protocols, 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-02T22:46:36Z</updated>
<entry>
<title>fw4: skip protocols a referenced port set does not apply to</title>
<updated>2026-11-02T22:46:36Z</updated>
<author>
<name>Philipp Raschdorff</name>
</author>
<published>2026-10-17T20:01:35Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=466e78ee25a710c07a75ee8c061f355be0f8fcbf'/>
<id>urn:sha1:466e78ee25a710c07a75ee8c061f355be0f8fcbf</id>
<content type='text'>
A rule or redirect with several protocols, e.g. `proto 'tcp icmp'`, that
references a set with a port field (`inet_service`) passed the TCP/UDP
check because one of the protocols has ports. For the other protocol
map_setmatch() returned null, the set match was emitted with an empty
field list and the rule came out as

  meta l4proto icmp  @ports counter jump accept_to_lan comment "..."

which is invalid nft syntax: `fw4 check` failed and the whole ruleset
did not load.

Skip the protocol the set does not apply to, with a warning naming the
set and the protocol, and keep the rule for the remaining protocols. A
rule whose only protocol lacks ports is still rejected as before.

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>
</feed>
