systemd-resolved: the guard applies the uplink's names every round (issue 960)

Each round it finds the link carrying the default route (the lowest-metric
kernel default route that is neither one route routed nor the private
network's interface), gives it the names from uplink-names's file plus
its own search and routing domains, and takes them off the link they were
on before when that differs. What it applied is kept in
uplink-names.applied, read at its own start so a restart never infers
which link to take them off, and a resolved refusal is journalled once
per change, not every round. The guard's own names are left out of
whether a link is judged `route` routed, so the fallback still gives a
link holding only them its default route back while the mesh's resolvers
are silent (ADR 0688 stands).

Builds: design 08 sign-in-page §7, §8
This commit is contained in:
jochen
2026-11-24 21:23:06 +01:00
parent a40d7fb1c4
commit b694c5e2a5
4 changed files with 260 additions and 3 deletions
@@ -47,6 +47,9 @@ func guard() error {
return err
}
g.writeHistory()
// Read what it applied last, so a restart takes the uplink's names off the link it names, never
// inferring which (design 08 sign-in-page §8).
g.applied = ReadUplinkApplied(g.Resolver.UplinkNamesAppliedFile)
go g.Run(ctx)
return g.Serve(ctx, Socket)
}