mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-29 02:51:29 +02:00
feat(dns): derive the mesh DNS apex for zone-based endpoints
The zone a private service's synthesized A record hangs under was derived from the serving proxy's address or from a validated custom domain. A placement-free endpoint matches neither, so the apex came out empty, the service was skipped, and the tenant's hostname resolved to nothing -- with no error logged. Synthesized services now carry their zone explicitly and it is preferred when deriving the apex. The field is in-memory only: these services are built per read and never persisted, and the zone cannot be supplied as a parameter instead because it is captured per account at allocation time, so a single current-config value would misclassify any tenant allocated under a previous one. A blanket "use the parent of the hostname" fallback was rejected: the same empty apex also occurs for a service whose domain has no validated entry for its cluster, and those resolve to nothing deliberately, so a blanket fallback would turn domain validation into a no-op.
This commit is contained in:
@@ -945,6 +945,7 @@ func buildAccountService(
|
||||
Name: "agent-network-" + accountID,
|
||||
Domain: domain,
|
||||
ProxyCluster: cluster,
|
||||
DNSZone: settings.Zone, // empty for legacy rows → unchanged behavior
|
||||
Mode: rpservice.ModeHTTP,
|
||||
Enabled: true,
|
||||
Private: true,
|
||||
|
||||
Reference in New Issue
Block a user