<feed xmlns='http://www.w3.org/2005/Atom'>
<title>firewall4/tests/06_includes/06_invalid_include, 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 an include section with invalid options</title>
<updated>2026-11-02T22:46:36Z</updated>
<author>
<name>Koral Ilgun</name>
</author>
<published>2026-10-15T02:48:02Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/firewall4/commit/?id=40f032c29a0e46b130f6673fab09a66dbdc409b5'/>
<id>urn:sha1:40f032c29a0e46b130f6673fab09a66dbdc409b5</id>
<content type='text'>
parse_options() returns false for a section that lacks a required
option or holds an invalid value. parse_include() used the result
without a check, so an include section without a path stopped the
render of the whole ruleset:

  Reference error: left-hand side expression is not an array or object

fw4 reload deletes the state file before the render, so after such a
failure each later reload stops with "The fw4 firewall does not appear
to be loaded." until a restart of the firewall.

Skip the section with a warning, as the parsers of the rule, forwarding,
redirect and zone sections do, and add a test case for it.

Signed-off-by: Koral Ilgun &lt;koral.ilgun@adtran.com&gt;
</content>
</entry>
</feed>
