Compare commits

...

3 Commits

Author SHA1 Message Date
Brian Picciano
d916d1a630 Fix dnsmasq config 2022-11-05 16:25:24 +01:00
Brian Picciano
a153911948 Forgot to write bootstrap to data dir during reload 2022-11-05 16:21:49 +01:00
Brian Picciano
0b094f057e Fix how host object is initialized during daemon startup 2022-11-05 15:50:04 +01:00
3 changed files with 13 additions and 5 deletions

View File

@ -71,6 +71,11 @@ func reloadBootstrap(
}
hostBootstrap.Hosts = newHosts
if err := writeBootstrapToDataDir(hostBootstrap); err != nil {
return bootstrap.Bootstrap{}, false, fmt.Errorf("writing new bootstrap to data dir: %w", err)
}
return hostBootstrap, true, nil
}

View File

@ -15,11 +15,14 @@ func mergeDaemonConfigIntoBootstrap(
) (
bootstrap.Bootstrap, error,
) {
host := hostBootstrap.ThisHost()
host.Nebula.PublicAddr = daemonConfig.VPN.PublicAddr
host.Garage = nil
host := bootstrap.Host{
Name: hostBootstrap.HostName,
Nebula: bootstrap.NebulaHost{
SignedPublicCredentials: hostBootstrap.Nebula.SignedPublicCredentials,
PublicAddr: daemonConfig.VPN.PublicAddr,
},
}
if allocs := daemonConfig.Storage.Allocations; len(allocs) > 0 {

View File

@ -32,7 +32,7 @@ no-hosts
user=
group=
{{- $domain := . -}}
{{- $domain := .Domain -}}
{{- range .Hosts }}
address=/{{ .Name }}.hosts.{{ $domain }}/{{ .IP }}