systemd-resolved: uplink-names, the guard keeps them on the uplink, routes answers them (design 08 sign-in-page) #753

Merged
mesh-tools merged 12 commits from feat/sign-in-page-resolver into main 2026-11-25 00:20:08 +00:00
4 changed files with 14 additions and 2 deletions
Showing only changes of commit ae7d0f874b - Show all commits
+1 -1
View File
@@ -20,7 +20,7 @@ itself (NetworkManager's VPNs, WireGuard set up by networkd, Tailscale) needs no
| `/etc/node-resolver/suffix` | the mesh's own domain, which a route may never take |
| `/etc/systemd/resolved.conf.d/50-mesh.conf` | every mesh resolver as the default route for names (`DNS=`, `Domains=~.`), no public fallback, the stub on loopback and on the private address, no cache, no LLMNR or mDNS |
| `/etc/node-resolver/answer-within` | the config value `answer-within`: how long the guard gives each of the mesh's resolvers to answer before it takes them for silent (issue 1981) |
| `/etc/node-resolver/private-interface` | the private network's own interface name, so the guard never gives the uplink's names to it (design 08 sign-in-page §7, DQ-1) |
| `/etc/node-resolver/private-interface` | the private network's own interface name, so the guard never gives the uplink's names to it (design 08 sign-in-page §7, DQ-1); the literal `mesh0` (lead answer L-2), as netcheck and networkmanager already name it |
| `/var/lib/node-resolver/uplink-names` | the host names `uplink-names` gave, one a line, root's, written through `sudo -n install` then `sudo -n mv -f` (§6); stays until an empty list or a person's cleanup, even once the module leaves |
| `/var/lib/node-resolver/uplink-names.applied` | the guard's own record of what it last gave the link carrying the default route: the names, the link, when, and resolved's refusal or empty (§8); read at the guard's start, so a restart takes the names off the link it names, never inferring which |
| `/run/node-resolver/fallback.json` | whether the mesh's resolvers are silent now, by ADR 0688's guard, and since when; `routes`' `mesh_resolvers` field reads it; gone at the next boot, and the guard's first round writes it again |
@@ -53,6 +53,11 @@ func TestTheManifestSaysWhatTheGuardKeeps(t *testing.T) {
if m.Facts["resolvers"].Path != ResolvConf || m.Facts["kept"].Path != KeptPath || m.Facts["suffix"].Path != SuffixPath {
t.Errorf("the rendered paths are not the ones the guard reads: %+v", m.Facts)
}
// design 08 sign-in-page §7, DQ-1; lead answer L-2: the literal interface name, as netcheck and
// networkmanager already name it.
if m.Facts["private-interface"].Path != PrivateInterfacePath || m.Facts["private-interface"].Template != "mesh0\n" {
t.Errorf("the private interface fact is %+v", m.Facts["private-interface"])
}
if m.Facts["resolvers"].Template != m.Facts["kept"].Template {
t.Error("the resolver file and the copy the guard puts back are not one template")
}
@@ -163,7 +163,10 @@ func (r *Resolver) asks(ctx context.Context, server string) bool {
const SuffixPath = "/etc/node-resolver/suffix"
// PrivateInterfacePath is the file the mesh renders the private network's own interface name into,
// beside SuffixPath (the manifest's fact `private-interface`; design 08 sign-in-page §7, DQ-1).
// beside SuffixPath (the manifest's fact `private-interface`; design 08 sign-in-page §7, DQ-1). The fact's
// template is the literal `mesh0` (lead answer L-2): the live interface, named the same way already by
// netcheck's `TunnelInterface` and networkmanager's `unmanaged-devices`; one value every module reads
// instead is the thorough fix, carried as a finding outside this milestone.
const PrivateInterfacePath = "/etc/node-resolver/private-interface"
// UplinkNamesPath is where `uplink-names` keeps the host names, one a line, whole (design 08 sign-in-page
+4
View File
@@ -67,6 +67,10 @@
"suffix": {
"path": "/etc/node-resolver/suffix",
"template": "{{.Suffix}}\n"
},
"private-interface": {
"path": "/etc/node-resolver/private-interface",
"template": "mesh0\n"
}
},
"resources": [