Repository navigation
Conversation
parker/tunnels.lua now owns the handshake age limit and the parker-sites status check. noderoute.lua makes its decision with it, and noderoute.sh asks it for the set of usable tunnels while it waits. The decision does not change. tests/noderoute-test.lua runs noderoute.lua against a mock node.
Each step of apply_network() is now a function of its own: configure_routing(), configure_client(), stop_other_radvd(), reload_network(), update_dnsmasq(), update_pref64(), update_adv_mtu(), update_radvd(), update_dhcp_options(), update_clat() and wait_for_services(). The order of the steps and what they do do not change.
Each noderoute cycle wrote about 16 log lines, also when nothing changed. Now noderoute writes one "state:" line only when the tunnels, the route, the addresses or the lease count change. Transitions, warnings and errors are logged as before. The routing decisions and the network actions do not change.
Put the small apply_network steps back into apply_network. Keep only configure_routing and configure_client. Log the state as one short line. Do not log handshake ages or the default route. Keep the state line in a stable order, because util.shuffle changes the tunnel list in place. Make parker/tunnels.lua smaller. It has only active() and key(). Make the tests smaller. The action trace is the same as before.
…rker The DHCPv4 options for UniFi and Omada access points do not need Parker. Other communities can also use them. Move them into the new package ffmuc-dhcp-ap-controllers. It reads dhcp_ap_controllers.unifi4 and dhcp_ap_controllers.omada4 from site.conf. It removes the old section parker_unifi of earlier firmware. Remove the options, the site.conf keys parker.unifi_controller4 and parker.omada_controllers4, and their documentation from ffbs-mesh-vpn-parker. Ref: freifunkMUC/site-ffm#1014
clientaddr moves the client address of a node away from other nodes. This is only necessary when the config service gives all nodes the same range4 and address4. That is only possible with 464XLAT, because then the client IPv4 does not leave the node. Without 464XLAT, each node routes its own range4, and no other node can use its address. Use clientaddr only when the config has xlat_range6. Without it, the node always uses address4 of the config service (usually the .1 address). This is the upstream behaviour, and no new option is necessary. Ref: freifunkMUC/site-ffm#1015
After a gateway change, the node keeps its old client address for 150 s and sends a DHCPNAK to its old clients. The lease time is 2 min. These parts help all communities and stay on. The node does not keep the address when batman-adv has seen another node with it. This check is only correct when all uplinks can have the same address, thus only with 464XLAT. Without 464XLAT, each node has its own range4, and the address belongs only to this node. Do the check only when the config has xlat_range6. Without it, keep the address for the full 150 s. Ref: freifunkMUC/site-ffm#1016
Gluon removed the interface cellular_6 (freifunk-gluon/gluon#3618). The interface is now cellular. Gluon adds cellular and cellular_4 to interface.d of gluon-wan-dnsmasq. Thus the entry cellular_6 has no function. Remove the interface.d file and cellular_6 from the script and the tests. Keep the fallback list: on OpenWrt 24.10, the qmi and mbim proto handlers still drop the DNS servers when peerdns is 0. Ref: freifunkMUC/site-ffm#1013
During the hold after a gateway change, the hold config made dnsmasq
authoritative. An authoritative dnsmasq sends a DHCPNAK ("wrong
server-ID") to a DHCPREQUEST in SELECTING state that names another
server. This is against RFC 2131 4.3.2. In the lab, the old uplink sent
a DHCPNAK to the clients that requested a lease from the new uplink.
Remove dhcp-authoritative from the hold config. The main dnsmasq is not
authoritative (905-dhcp-not-authoritative). dnsmasq still sends a
DHCPNAK to a renewal per unicast, and to a rebinding or INIT-REBOOT for
a lease in its lease file.
Small loss: a broadcast rebinding for a lease that dnsmasq does not know
gets no DHCPNAK. Such a client waits until its lease (2 min) ends.
Add test cases for SELECTING with the Server-ID of another server, and
for rebinding, INIT-REBOOT and renewal with a known lease.
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the points that @grische found in the Parker review. Thank you, @grische, for the careful review.
cellular_6is removed from ffmuc-cellular-wan-dns.Depends on
Commits
43cb31dffmuc-dhcp-ap-controllers: move the UniFi and Omada options out of parker (site-ffm#1014).The new package reads
dhcp_ap_controllers.unifi4anddhcp_ap_controllers.omada4from site.conf. It removes the old uci sectionparker_unifi. ffbs-mesh-vpn-parker no longer hasparker.unifi_controller4andparker.omada_controllers4.c49da72ffbs-mesh-vpn-parker: move the client address only with 464XLAT (site-ffm#1015).The config service can give all nodes the same
range4only with 464XLAT, because the client IPv4 does not leave the node. Thusxlat_range6in the node config is the switch. No new option is necessary. Withoutxlat_range6, the node usesaddress4of the config service (the .1 address), as upstream.bb5723cffbs-mesh-vpn-parker: check for a used client address only with 464XLAT (site-ffm#1016).DHCPNAK after a gateway change and the 2 min lease stay on for all. The batman-adv check ("another node had this address in the last 60 s") runs only with
xlat_range6. Without 464XLAT, the address belongs only to this node, and the node keeps it for the full 150 s.28792c9ffmuc-cellular-wan-dns: remove cellular_6 (site-ffm#1013).Gluon removed
cellular_6(Fix cellular IPv6 DNS servers + related cleanup freifunk-gluon/gluon#3618), so the entry had no function. The DNS fallback stays: on OpenWrt 24.10, the qmi and mbim handlers still drop the DNS servers withpeerdns 0(fixed in newer OpenWrt by package: utils: remove dependence on peerdns to add dns servers openwrt/openwrt#21314).62256c3ffbs-mesh-vpn-parker: do not set dhcp-authoritative in the DHCPNAK hold.An authoritative dnsmasq sends a DHCPNAK ("wrong server-ID") to a DHCPREQUEST in SELECTING state for another server (against RFC 2131 4.3.2). The old uplink then NAKed the new lease of a client from the new uplink. Small loss: a broadcast rebinding for a lease that dnsmasq does not know gets no DHCPNAK. Such a client waits until its 2 min lease ends.
Compatibility with ffbs
ffbs has no
xlat_range6. Thus ffbs nodes useaddress4from the config service and do nobatctl dcchecks, as upstream. The DHCPNAK hold and the 2 min lease are the same for all.Changes needed in site.conf
Sites that used
parker.unifi_controller4orparker.omada_controllers4must:dhcp_ap_controllers = { unifi4 = '...', omada4 = { '...' } }.ffmuc-dhcp-ap-controllers.Tests
Lab, image with community-packages
28792c9(cp28792c9):ubnt) and option 138 (Omada): PASS.xlat_range6, the client address moves on a conflict: PASS.range4: the node uses the .1 address and does not move it: PASS.Lab re-test, image with community-packages
62256c3(cp62256c3): 3/3 PASS.Local:
tests/dhcp-authoritative-test.sh(dnsmasq 2.90, alpine 3.20, Docker): 17/17 PASS. With--dhcp-authoritativeput back, the new SELECTING check fails, so the test finds the bug.luajiton allffbs-mesh-vpn-parker/tests/*.lua(withLUA_PATH="luasrc/usr/share/lua/?.lua;;"): all PASS. New:tests/dhcpnak-test.lua, and 3 checks intests/noderoute-test.lua. The new checks fail on the old code.ffmuc-dhcp-ap-controllers/tests/upgrade-test.lua: 6/6 PASS.ffmuc-cellular-wan-dns/tests/update-test.lua: 13/13 PASS.luacheck .: 0 warnings / 0 errors.shellcheck: no findings.Not tested: