Skip to content

luci-app-firewall: fix custom rules page for fw4#8405

Open
etb-source wants to merge 1 commit intoopenwrt:masterfrom
etb-source:luci-firewall-custom-rules-fw4
Open

luci-app-firewall: fix custom rules page for fw4#8405
etb-source wants to merge 1 commit intoopenwrt:masterfrom
etb-source:luci-firewall-custom-rules-fw4

Conversation

@etb-source
Copy link

This fixes the Custom Rules page on firewall4 systems.

The page is currently hidden by a dependency on
/usr/share/fw3/helpers.conf, which is fw3-specific and not needed for firewall4.

This change removes that dependency so the page is shown again on fw4,
and updates the page text to refer to nftables syntax instead of iptables.

  • This PR is not from my main or master branch 💩, but a separate branch ✅
  • Each commit has a valid ✒️ Signed-off-by: <my@email.address> row (via git commit --signoff)
  • Each commit and PR title has a valid 📝 <package name>: title first line subject for packages
  • Incremented 🆙 any PKG_VERSION in the Makefile
  • Tested on: ipq806x/generic, OpenWrt 24.10.5, Firefox
  • Description: This change removes the dependency on /usr/share/fw3/helpers.conf, which is fw3-specific and not needed for firewall4, so the page is shown again on fw4, and updates the page text to refer to nftables syntax instead of iptables.

Closes #7428

The "Custom Rules" page is currently hidden by a dependency on
/usr/share/fw3/helpers.conf, which is fw3-specific and not needed for
firewall4 systems.

Remove the unnecessary dependency so the page is shown again on fw4,
and update the page text to refer to nftables syntax instead of
iptables.

This addresses openwrt#7428.

Signed-off-by: Edwin ten Brink <git@tenbrink-bekkers.nl>
@systemcrash
Copy link
Contributor

This change co-opts the fw3 rules page and changes it to a fw4 rules page. What do fw3 users do?

@etb-source
Copy link
Author

This patch is not intended to remove fw3 support.

It only removes the fw3-specific visibility dependency for the Custom Rules page:
/usr/share/fw3/helpers.conf.

The concrete problem in #7428 is that this extra dependency hides the page on fw4 systems, even though fw4 is the default firewall backend on current OpenWrt releases.

So the intent here is narrower:

  • keep the existing page
  • make it visible again on fw4
  • update the page text so it no longer refers to iptables when used on fw4

For fw3 users, this patch does not remove the page or replace fw3-specific functionality; it only stops gating the page on a fw3-specific helper file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

luci: custom firewall rules don't show up with fw4

2 participants