Skip to content

luci-mod-network: IP sets "Save & Apply" works for adding IPs but not removing IPs #8100

@Skwidder

Description

@Skwidder

Is there an existing issue for this?

  • I have searched among all existing issues (including closed issues)

screenshots or captures

Screencast_20251118_205218.mp4

Actual behaviour

When modifying IP sets through Network → Firewall → IP Sets, clicking "Save & Apply" correctly applies added IPs to nftables, but does NOT remove deleted IPs from the running firewall.

Testing results:

  • Adding IPs: Works correctly ✓ (new IP appears in nft list set)
  • Removing IPs: Saved to /etc/config/firewall but not removed from running nftables set ✗

Note: This occurs when removing ANY IP from the set, not just the last one. Even when multiple IPs remain in the set after removal, the deleted IP persists in the running nftables configuration until service firewall restart is executed.

Workaround: Run service firewall restart after removing IPs.

Expected behaviour

Both adding and removing IPs should be immediately reflected in the running nftables IP set after clicking "Save & Apply". Users should not need to manually restart the firewall service.

Steps to reproduce

  1. Navigate to Network → Firewall → IP Sets → (any IP set)
  2. Add a new IP address → Save & Apply
  3. Run nft list set inet fw4 <ipset_name> - verify new IP is present ✓
  4. Remove an IP address from the same set → Save & Apply
  5. Run nft list set inet fw4 <ipset_name> - removed IP still present ✗
  6. Run service firewall restart
  7. Run nft list set inet fw4 <ipset_name> - now removed IP is gone

The issue is that step 4-5 should work without requiring step 6.

Additional Information

- Model: Netgear Nighthawk X4S R7800
- Target: ipq806x/generic
- Architecture: arm_cortex-a15_neon-vfpv4
- Firmware Version	OpenWrt 24.10.2 r28739-d9340319c6 / LuCI openwrt-24.10 branch 25.168.50434~d6b13f6

What browsers do you see the problem on?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions