mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
fixup! cmd/headscale/cli/utils: merge ip_prefix with ip_prefixes in config
This commit is contained in:
parent
74f26d3685
commit
0a1db89d33
1 changed files with 4 additions and 1 deletions
|
@ -251,7 +251,8 @@ func getHeadscaleConfig() headscale.Config {
|
|||
// dedup
|
||||
normalizedPrefixes := make(map[string]int, len(parsedPrefixes))
|
||||
for i, p := range parsedPrefixes {
|
||||
normalizedPrefixes[p.String()] = i
|
||||
normalized, _ := p.Range().Prefix()
|
||||
normalizedPrefixes[normalized.String()] = i
|
||||
}
|
||||
|
||||
// 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("==> %v", prefixes)
|
||||
|
||||
return headscale.Config{
|
||||
ServerURL: viper.GetString("server_url"),
|
||||
Addr: viper.GetString("listen_addr"),
|
||||
|
|
Loading…
Reference in a new issue