Repository navigation
parker-sites: use rx traffic as a second liveness check (carry) - #66
Merged
Merged
Conversation
On a lossy or bloated uplink, the 1 s ping to the pgw gets lost or comes late during big downloads. The node then moves to another pgw or site, and the download breaks. While rx of the current pgw grows by 48 KB in 3 s (2 of 3 ticks), a missed ping of a site that is up is not counted, for at most 30 s after the last answer. The ping then waits up to 3 s in the background, and a late reply counts as an answer. Carry never makes a pgw or site up. Without traffic, nothing changes.
A tick with only a small rx growth counted as a carry tick. After a pgw stops during a download, the data in flight and the retransmits then kept the window active for 3 more ticks, and the failover took 7-8 s instead of about 5 s (lab: one-way cut under load). Now a tick counts only when rx grew by at least carry_bytes / carry_window (16 KB).
This was referenced Nov 21, 2026
This was referenced Nov 21, 2026
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
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.
Problem
On a lossy or bloated uplink (for example LTE during a big download), the 1 s ping to the pgw gets lost or comes late. The node counts 3 misses, moves to another pgw or site, and the download breaks. The pgw works.
Change
parker/carry.lua. A tunnel "carries" when the WireGuard rx of the current pgw grew by 48 KB or more in the last 3 s, and by 16 KB or more in at least 2 of these 3 s. Only rx is used. WireGuard counts rx only for authenticated packets. TX proves nothing.carry_bytes = 0disables carry.statusshowscarry=andcarried=. Values are inuci parker.sites:carry_bytes,carry_window,carry_ticks,carry_max,probe_wait_busy.Tests
Unit tests (from
ffbs-mesh-vpn-parker/):lua tests/carry-test.lua(Lua 5.5) andluajit tests/carry-test.lua: 15 cases, all pass.luacheck luasrc/usr/share/lua/parker/carry.lua tests/carry-test.lua: 0 warnings, 0 errors.Lab (QEMU arm64 mesh lab, node u1, image
v2026.11.1-parker5+cp0798007-lab, armsr-armv8):iptables/ip6tableson u1 for the WireGuard endpoint (both ways, or node to pgw only).carry.luaof 3a51649 copied to u1 (md5 checked). The rest of the image is 0798007.Not tested:
carry.luaof 3a51649.