If I enter the rule via the console and look at the rule set, I get the following message:
root@rome01:~# nft list ruleset | grep 239
# Warning: table ip mangle is managed by iptables-nft, do not touch!
iifname "br-wlan" ip daddr 239.255.255.250 counter packets 294 bytes 98706 xt target "TTL"
Do not mix nftables and iptables.
Translate your rule into nftables syntax.
uci add firewall include
uci set firewall.@include[-1].type='nftables'
uci set firewall.@include[-1].path='/etc/multicast_ttl_rule.nft'
uci set firewall.@include[-1].position='chain-pre'
uci set firewall.@include[-1].chain='mangle_prerouting'
cat << "EOF" > /etc/multicast_ttl_rule.nft
iifname "br-wlan" ip daddr 239.255.255.250 ip ttl set 2 counter
EOF
uci commit firewall
fw4 restart
I get the following error message with the last command:
root@rome01:~# fw4 restart
Reference error: left-hand side expression is not an array or object
In [anonymous function](), file /usr/share/ucode/fw4.uc, line 3191, byte 12:
called from function [arrow function] (/usr/share/ucode/fw4.uc:787:71)
called from function foreach ([C])
called from function [anonymous function] (/usr/share/ucode/fw4.uc:787:72)
called from function render_ruleset (/usr/share/firewall4/main.uc:56:24)
called from anonymous function (/usr/share/firewall4/main.uc:143:29)
` if (!inc.enabled) {`
Near here -------^
The rendered ruleset contains errors, not doing firewall restart.