fixup! cmd/headscale/cli/utils: merge ip_prefix with ip_prefixes in config
@@ -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"),
