Skip to content

ffbs-parker-respondd: count the clients of routing nodes - #61

Merged
awlx merged 1 commit into
parker-release-2026.11from
awlx-parker-client-count
Nov 21, 2026
Merged

awlx merged 1 commit into
parker-release-2026.11from
awlx-parker-client-count

Conversation

@awlx

@awlx awlx commented Nov 21, 2026

Copy link
Copy Markdown
Member

Problem

On parker nodes that route their clients, the map shows a client count that is 0 or too low.

gluon-mesh-batman-adv sets clients.total to the number of clients in the local translation table of bat0. A routing node is the router of its clients. Their frames stay in br-client and do not go into bat0. Thus the translation table contains only the node itself.

Change

While the node routes for its clients (network.client.proto is static), ffbs-parker-respondd sets clients.total to the number of unique MACs of:

  • the bridge FDB of br-client: learned entries on all ports except bat0 and local-port, with a frame in the last 60 seconds,
  • the stations of the client access points (network=client, mode=ap) with activity in the last 60 seconds.

The clients of other nodes come in through bat0. They do not count. The count does not use ARP, the IPv6 neighbour table or DHCP leases. These tables contain the clients of other nodes that use this node as router, and they do not contain IPv6-only (CLAT) clients.

A mesh-only node keeps the value of gluon-mesh-batman-adv. clients.wifi* and clients.owe* do not change.

Other changes:

  • New dependencies: libiwinfo, libuci. PKG_VERSION is 2.
  • README: new section "Clients".
  • tests/run.sh: host test for the FDB filter.

Tests

Unit test (FDB filter and MAC set, ASan and UBSan):

cd ffbs-parker-respondd
docker run --rm -v "$PWD":/p -w /p gcc:14 sh tests/run.sh

Result: PASS, 15 of 15 filter cases and the MAC set check. The cases include: port and bridge entries, bat0 and local-port, permanent and self entries, multicast MAC, age limit, and wrong message type or family.

Compile check: respondd.c and clients.c compile with -Wall -Wextra -Werror against the libiwinfo, libuci and respondd headers.

Lab test: QEMU mesh lab, 6 nodes (armsr-armv8), image v2026.11.1-parker5+cp5d8b362-lab. u1 and u2 route. m1 to m4 are mesh-only, and m4 is behind m3. The lab has 12 clients, which include an IPv6-only (CLAT) client on u1.

Check Before After
u1 (routing, 4 clients incl. CLAT) clients.total 0 4
u2 (routing, 1 client) – 1
m1 to m4 (mesh-only) stock stock, no change (4, 1, 1, 1)
Sum of all nodes (as yanic adds) too low 12 = 12 clients, no double count
Stop one u1 client – 4 → 3 after 60 to 75 s, 4 again after start
Cut u1 uplink for 120 s – proto dhcp, stock value; after the heal, static and 4

The u1 IPv6 neighbour table had 30 entries at the same time. This shows that a count from ARP or the neighbour table is not correct.

Not tested:

  • Real Wi-Fi stations. The lab has no Wi-Fi radio, so the station path (iwinfo assoclist) was not tested with real stations. Only the FDB path was tested.
  • Live nodes and the live map-parker. There was no test on live nodes.

gluon-mesh-batman-adv counts the clients in the local translation table
of bat0. A routing node is the router of its clients, so their frames
stay in br-client and do not go into bat0. The node then sends
clients.total 0 or a too low value.

While the node routes, set clients.total to the number of unique MACs
in the br-client FDB (all ports except bat0 and local-port, active in
the last 60 s) and of the stations of the client access points. The
clients of other nodes come in through bat0 and do not count.
@awlx
awlx merged commit 7912791 into parker-release-2026.11 Nov 21, 2026
9 checks passed
@awlx
awlx deleted the awlx-parker-client-count branch November 21, 2026 11:46
awlx added a commit to freifunkMUC/site-ffm that referenced this pull request Nov 21, 2026
Includes:
- freifunkMUC/community-packages#60: tests: fix ShellCheck SC2317
- freifunkMUC/community-packages#61: count the clients of routing nodes
- freifunkMUC/community-packages#66: rx traffic as a second liveness check
- freifunkMUC/community-packages#67: report the CLAT traffic through respondd
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