cmd/containerboot: don't parse empty subnet routes (#10738)

Updates#cleanup

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
Irbe Krumina
2024-01-04 12:17:15 +00:00
committed by GitHub
parent 5a2eb26db3
commit 3a9450bc06

View File

@@ -756,7 +756,7 @@ func ensureIPForwarding(root, clusterProxyTarget, tailnetTargetiP, tailnetTarget
if tailnetTargetFQDN != "" { if tailnetTargetFQDN != "" {
v4Forwarding = true v4Forwarding = true
} }
if routes != nil { if routes != nil && *routes != "" {
for _, route := range strings.Split(*routes, ",") { for _, route := range strings.Split(*routes, ",") {
cidr, err := netip.ParsePrefix(route) cidr, err := netip.ParsePrefix(route)
if err != nil { if err != nil {