Firewall trace section

Hi, when i reload firewall i get:

fw4 reload
Section @forwarding[1] option 'src' is mandatory but not set
Section @forwarding[1] skipped due to invalid options
Section @include[0] is not marked as compatible with fw4, ignoring section
Section @include[0] requires 'option fw4_compatible 1' to be considered compatible
Section @include[1] option 'reload' is not supported by fw4

how can i find this forwarding [1] ?
why firewall not print error's line ?

Thanks.

uci show firewall.@forwarding[1]
4 Likes

Yeah fixed.
Thanks :slightly_smiling_face:

Just to close this off... The fw4 shell scripts use a database-like shell API to get the option settings (via uci and json and maybe other tools), which simply returns values without any context. The script then does some consistency checking on and between values, and when it sees an issue it spits out as much as it knows. "What it knows" is typically just the name (like firewall.@redirect[0].target) and the value, so it has no idea that the value even came from some file much less the line number in the file (in fact, the value could be a default that is set by the script itself, which conflicts with some user setting from /etc/config/blah, so location would be meaningless).

If you want to get your hands dirty :grinning:, take a look at /usr/share/ucode/fw4.uc at around lines 800-820 for where that final is not supported message is being generated.

3 Likes

As long as there's a solution, I'm fine. :slightly_smiling_face:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.