mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-27 12:05:26 +00:00
fixup! cmd/headscale/cli/utils: merge ip_prefix with ip_prefixes in config
This commit is contained in:
parent
74f26d3685
commit
0a1db89d33
@ -251,7 +251,8 @@ func getHeadscaleConfig() headscale.Config {
|
|||||||
// dedup
|
// dedup
|
||||||
normalizedPrefixes := make(map[string]int, len(parsedPrefixes))
|
normalizedPrefixes := make(map[string]int, len(parsedPrefixes))
|
||||||
for i, p := range parsedPrefixes {
|
for i, p := range parsedPrefixes {
|
||||||
normalizedPrefixes[p.String()] = i
|
normalized, _ := p.Range().Prefix()
|
||||||
|
normalizedPrefixes[normalized.String()] = i
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert back to list
|
// convert back to list
|
||||||
@ -265,6 +266,8 @@ func getHeadscaleConfig() headscale.Config {
|
|||||||
log.Warn().Msgf("'ip_prefixes' not configured, falling back to default: %v", prefixes)
|
log.Warn().Msgf("'ip_prefixes' not configured, falling back to default: %v", prefixes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Warn().Msgf("==> %v", prefixes)
|
||||||
|
|
||||||
return headscale.Config{
|
return headscale.Config{
|
||||||
ServerURL: viper.GetString("server_url"),
|
ServerURL: viper.GetString("server_url"),
|
||||||
Addr: viper.GetString("listen_addr"),
|
Addr: viper.GetString("listen_addr"),
|
||||||
|
Loading…
Reference in New Issue
Block a user