Skip to content

fix: remove WAN link-local firewall exception#1265

Merged
ilario merged 2 commits into
libremesh:masterfrom
w3lld1:issue/1241
Jul 19, 2026
Merged

fix: remove WAN link-local firewall exception#1265
ilario merged 2 commits into
libremesh:masterfrom
w3lld1:issue/1241

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

I removed the lime_allow_wan_all_link_local firewall rule from lime-proto-wan, so configuring a WAN interface no longer opens every service to IPv6 link-local peers on that interface.

I also added a focused regression test that keeps the WAN device setup intact while checking that the firewall exception is absent.

Validation

I ran:

  • luac5.1 -p packages/lime-proto-wan/files/usr/lib/lua/lime/proto/wan.lua packages/lime-proto-wan/tests/test_wan.lua
  • focused Lua harness against wan.setup_interface (passes on this change and fails on master because master still modifies the firewall)
  • luacheck packages/lime-proto-wan/files/usr/lib/lua/lime/proto/wan.lua --no-unused --globals wan
  • luacheck packages/lime-proto-wan/tests/test_wan.lua --globals describe it before_each after_each stub assert
  • git diff --check

The full ./run_tests suite is deferred to CI because the local Docker socket is not accessible.

Fixes #1241

wan.setup_interface('eth0', {})

assert.is.equal('eth0', uci:get('network', 'wan', 'device'))
assert.is_nil(uci:get('firewall', 'lime_allow_wan_all_link_local'))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to test if this rule is effectively gone. This looks like an AI quirk.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the unnecessary regression test in 05460de. The PR now only removes the WAN link-local firewall exception.

@ilario

ilario commented Jul 18, 2026

Copy link
Copy Markdown
Member

Thanks @w3lld1 for the contribution, I can confirm that this fixes #1241 :)
I still have to run the test you added. Please check my comment in the code of the test: at first sight it seems that AI added a line that makes very little sense.

@ilario
ilario merged commit b8f5f2e into libremesh:master Jul 19, 2026
31 of 33 checks passed
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.

lime-proto-wan fails trying to allow link local traffic on WAN. Fix or erase?

2 participants