diff --git a/modules/systemd-resolved/README.md b/modules/systemd-resolved/README.md index dfaaf9c3a..3952968ed 100644 --- a/modules/systemd-resolved/README.md +++ b/modules/systemd-resolved/README.md @@ -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 | diff --git a/modules/systemd-resolved/cmd/resolver-tools/manifest_test.go b/modules/systemd-resolved/cmd/resolver-tools/manifest_test.go index 446319888..7d04d7847 100644 --- a/modules/systemd-resolved/cmd/resolver-tools/manifest_test.go +++ b/modules/systemd-resolved/cmd/resolver-tools/manifest_test.go @@ -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") } diff --git a/modules/systemd-resolved/cmd/resolver-tools/resolver.go b/modules/systemd-resolved/cmd/resolver-tools/resolver.go index 2d6b8c851..3079dd114 100644 --- a/modules/systemd-resolved/cmd/resolver-tools/resolver.go +++ b/modules/systemd-resolved/cmd/resolver-tools/resolver.go @@ -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 diff --git a/modules/systemd-resolved/module.json b/modules/systemd-resolved/module.json index a0eb879f4..e569346a5 100644 --- a/modules/systemd-resolved/module.json +++ b/modules/systemd-resolved/module.json @@ -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": [