Repository navigation
Conversation
The config service can send an optional captive_portal_url. The node sends it to its clients in DHCPv4 option 114 (RFC 8910). Without the field, the node sends no option 114 and removes an old one. nodeconfig.sh sends the Gluon domain of the node, so that the config service can select a URI for each domain.
noderoute writes captive_portal_url of the config service to /tmp/captive_portal and restarts uradvd when the value changes. The Gluon radvd arguments pass the file to uradvd --captive-portal, which sends RA option 37 (RFC 8910). Without the field, noderoute removes the file and the RA does not change.
This was referenced Nov 24, 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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
502af33468191ebad13fc4bdebef2a8d8d4abb95↓ RA option 37 needs freifunkMUC/uradvd#2 and freifunkMUC/site-ffm#1035 (both open).
↑ Unit test, luacheck and shellcheck are clean.
↓ Not tested on real hardware or with real RFC 8925 clients.
↓ CI not yet inspected.
Summary
The old central DHCP server sent a captive portal URI to the clients in DHCPv4 option 114 (RFC 8910). With Parker, each node runs its own dnsmasq, so this function was lost.
This PR brings it back. The config service (broker) gives the URI:
nodeconfig.shsends the Gluon domain of the node:&domain=<gluon.core.domain>. It sends the value only if it matches^[a-z0-9_-]{1,64}$.noderoute.luareads the optional fieldcaptive_portal_urland sets option 114 for the client network in dnsmasq.parker/dhcp.luachecks the value: https only, at most 255 bytes, no comma, space, quote or#. The node ignores an invalid value and logs it.noderoute.luawrites the URI to/tmp/captive_portaland restarts uradvd when the value changes. Without a URI, it removes the file. The Gluon radvd arguments pass the file touradvd --captive-portal. This needs feat: Implement --captive-portal (RFC 8910) uradvd#2 and parker: announce the captive portal in RAs (RFC 8910) site-ffm#1035. Without those, the file has no effect.Broker side: freifunkMUC/wgkex#341.
Compatibility
domainquery parameter. A config service that does not know it ignores it.Tests
Commands:
cd ffbs-mesh-vpn-parker lua tests/captive-portal-test.lua luajit tests/captive-portal-test.lua luacheck luasrc shellcheck files/usr/sbin/nodeconfig.shResults:
ok.Test cases: a valid URI is accepted.
http://, a comma, a space, a quote,#, a newline, more than 255 bytes and a non-string are rejected.merge_optionadds, replaces and removes option114and keeps the other options.Lab (isolated lab, no production systems; node u1 runs
v2026.11.1-parker8+cp1f917dd-lab; the lab config service has the same map logic as the broker):domain=ffmucand gets the URI. dnsmasq hasdhcp-option=client,114,https://ffmuc.net/captive.URL (114), length 25: "https://ffmuc.net/captive". dnsmasq sends it as a string.No longer announcing a captive portal. The client ACK has no option 114.http://URI or a URI with a comma. The node logsIgnoring invalid captive_portal_urland sends no option 114.RA option 37 (node u1 runs
v2026.11.1-parker8+cp502af33-ra37-lab, with uradvddaae278and freifunkMUC/site-ffm#1035):/tmp/captive_portal. PASSuradvd --captive-portal https://ffmuc.net/captive. RA option 37 has the URI. DHCP ACK option 114 has the same URI. PASSNot tested:
Thanks to Freifunk Dillingen/Donau for the report.