Skip to content

parker5: Batman V throughput, failover and DHCP fixes - #1006

Merged
awlx merged 3 commits into
parkerfrom
awlx-parker-batman-v-throughput
Nov 20, 2026
Merged

awlx merged 3 commits into
parkerfrom
awlx-parker-batman-v-throughput

Conversation

@awlx

@awlx awlx commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR makes parker5. It updates community-packages to the parker5 stack and adds one Gluon patch for Batman V. The fixes are for the map, for DHCP after a site switch, and for the router advertisements (RA) during a site failover.

Commits:

  • patches/0026: Batman V. The node sends the link throughput to respondd.
  • modules: community-packages 76b4411 → 70dba2e (merge commit of the stack; same tree as 7a2a037).

Community-packages stack (bottom to top):

Overview: where the parker5 fixes act

1. respondd gateway (#55)

  • Problem: The map showed the gateway of a node as plain text, for example "pgw02 (muc01)". The map did not link it to the pgw node.
  • Cause: In multi-site mode, parker-sites wrote the pgw name and the site into the respondd gateway field. yanic cannot find a node with this ID.
  • Fix: parker-sites writes the IPv6 link-local address of the active pgw. This is the same value as gateway6. yanic maps this address to the pgw node. If the pgw has no IPv6 address, the node uses the old text.

respondd gateway before and after

2. dnsmasq is not authoritative (#56)

  • Problem: After a site switch-back, Android 11 clients had no IPv4 until a manual Wi-Fi reconnect.
  • Cause: All uplink nodes serve the same client network. A client can still have a lease of the other uplink node. The node drops the unicast renewal (rule PARKER_DHCP). The client then sends a rebind as a broadcast. An authoritative dnsmasq answered with a DHCPACK for the same address, but with a different router address. Android 11 then failed to change its IPv4 default route ("File exists").
  • Fix: dnsmasq is not authoritative. It does not answer a request for a lease that it did not give. The client keeps the other uplink node through the mesh until the lease ends (max. 2 minutes). Then it gets a new lease with a DHCPDISCOVER. The address does not change, so no two nodes use the same address. The DHCPNAK mode of an inactive node does not change.

dnsmasq before and after

3. RA goodbye race (#57)

  • Problem: When the site of an uplink node went down, its clients had no IPv6 default router for about 40 s. Android 15 with CLAT (IPv6-only) dropped the Wi-Fi connection.
  • Cause: The node sent RAs with router lifetime 0 at once. The RA of the new router came about 40 s later.
  • Fix (74b26b6): The node stops its RA daemons and starts parker-ra-goodbye. The script waits until a new router is on br-client. After 2 s more, it sends router lifetime 0 for 8 s. If no new router comes in 180 s, it sends nothing. The router lifetime on the clients then ends by itself.

RA timeline of a site failover, before and after

The lab found three more faults in this logic. These commits fix them:

  • c899339: All uplink nodes can come back at the same time. Then the router of another node can come first, and the node sent router lifetime 0 for its own prefixes. Now the node sends nothing when a site of the node is up again.
  • fb3b50a: An uplink node with no tunnels still sends RAs, but only with deprecated prefixes. When all uplink nodes were down, the script took such a node as the new router. Now a new router must have a preferred prefix of another node.
  • 3925bed: parker-sites could start the parker uradvd again on an inactive node. That node then sent router lifetime 180 and a preferred prefix for the full outage. Now parker-sites stops the parker uradvd when no site is active.

When the node sends router lifetime 0

4. util.log quoting (#58)

  • Problem: Some log lines were lost, for example "RA: cancel the router lifetime 0 (pid N)". JSON log lines lost their quotes.
  • Cause: util.log gave the message to the shell without quotes. A "(" in the message caused a shell syntax error.
  • Fix: util.log quotes the message.

5. Batman V throughput (patches/0026)

  • Problem: The map showed TQ 100 % for most Parker links and no throughput.
  • Cause: The parker Batman V patch series sent a pseudo TQ for each neighbour. The value was 255 for all links of 54 Mbit/s or more. The node did not send the throughput.
  • Fix: The node sends the raw throughput in kbit/s in the throughput field and no pseudo TQ. yanic with Batman V support writes source_tp and target_tp to meshviewer.json. The status page does not change. This is a port of add Batman V support freifunk-gluon/gluon#3736 to the gluon-parker tree. Thank you to @grische for the upstream change.

Batman V before and after

Map frontend: map-parker uses meshviewer v14.0.0. This version does not show source_tp. To show the throughput, map-parker needs a meshviewer build with Batman V support (freifunk/meshviewer#345). This PR does not change the map.

Tests

Lab: 6 nodes (2 uplink nodes, 4 mesh nodes), 2 pgw sites, 12 clients (Alpine, Debian 12 and 13, Android 9, 11 and 15). Image v2026.11.1-parker4+siteb9af1b7+cp7a2a037-lab-extra on all 6 nodes. It contains the commits of this PR. No hot patches. Test B ran on the earlier parker5 image (without c899339, fb3b50a, 3925bed, 7a2a037 and the Batman V patch).

Test Result Evidence
A respondd gateway PASS gateway = gateway6 in 48 of 48 polls during a site cut. The value follows the active pgw (pgw01 → pgw02 → pgw04 → pgw02).
B client failover PASS 11/12 Uplink cuts u1 and u2. Mesh IPv6 gap 8–10 s (before: 16–22 s). IPv4 gap 44–48 s. Android 15: see limits.
C Android 11, dnsmasq PARTIAL authoritative = 0. No duplicate ARP. IPv4 comes back with no manual step, but only at the lease end (81 s). See limits.
D RA order PASS New router after 42–43 s, then router lifetime 0. No lifetime 0 before the new router. Android 15 keeps Wi-Fi (gap 14 s, before: 72 s).
E both uplinks cut PASS 120 s: no router lifetime 0 ("site of this node is up again"). 200 s: "No new IPv6 router after 180s", no router lifetime 0.
F leftovers PASS One uradvd per node. No parker-ra-goodbye process and no stray firewall rule after the tests.
G hard kill of u2 PASS IPv4 outage 61–90 s until a new lease (limit 150 s). Clients on u1: no outage.
H Batman V PASS batctl ra: BATMAN_V on all nodes. Each respondd neighbour has throughput and no tq. The status page shows tp.
I client roaming PASS (with limits) Moves in the area of one uplink node: gap ≤ 0.2 s, TCP continues. Moves to the other uplink node: see limits. No DHCPNAK, no duplicate ARP, no router lifetime 0.

Also:

  • tests/ra-goodbye-test.sh in community-packages: 20 PASS.
  • scripts/apply_patches.sh: all patches apply on gluon-parker 029ea60.
  • respondd-neighbours.c compiles with gcc -Wall -Wextra and gives no warnings.

Known client limits (no node fix):

  • Android 15 (CLAT): clatd does not follow a prefix change. After a failover or a move to the other uplink node, IPv4 stays down until a Wi-Fi reconnect. If no router is available for more than 180 s, Android 15 drops Wi-Fi.
  • Android 11: after a switch-back, IPv4 comes back only at the lease end (up to 2 minutes), with a short Wi-Fi reconnect.
  • A move to the area of the other uplink node changes the NAT exit and the IPv6 prefix. Open IPv4 TCP connections stop. IPv6 is not seamless for up to 180 s.

Not tested:

  • No live test.
  • No yanic in the lab. Thus the lab did not check the map. Batman V link throughput was 1 Mbit/s on all lab links, because virtual links have no speed value.
  • Windows clients and real Wi-Fi radio effects.

awlx added 2 commits November 20, 2026 11:37
Parker nodes sent a pseudo TQ for Batman V neighbours. The map showed
TQ 100% for most links and no throughput.

Add a patch that sends the raw throughput in kbit/s. yanic with
Batman V support then writes source_tp and target_tp.

Port of the upstream change by Grische (freifunk-gluon/gluon#3736)
to the gluon-parker Batman V patch series.
Update ffbs-mesh-vpn-parker:
- report the pgw address as respondd gateway
- make dnsmasq not authoritative
- send router lifetime 0 only after a new router
- no router lifetime 0 when a site of the node is up again
- a router with deprecated prefixes only is not a new router
- stop the parker uradvd when no site is active
- quote the message in util.log
@awlx
awlx requested review from a team and maurerle as code owners November 20, 2026 15:44
7a2a037 is not on parker-release-2026.11 as a branch point, so
gluon-prepare fails. Pin the merge commit 70dba2e. It has the same
tree as 7a2a037.
@awlx
awlx merged commit 5ebe256 into parker Nov 20, 2026
35 checks passed
@awlx
awlx deleted the awlx-parker-batman-v-throughput branch November 20, 2026 16:04
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.

1 participant