Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

irbekrm
Copy link
Contributor

@irbekrm irbekrm commented Jan 4, 2024

Fixes a bug introduced here - I assumed that strings.Split returns an empty slice for an empty target, however it returns a slice with one item - which causes us to loop over routes once and fail when parsing the empty string as an IP address:

$ k logs ts-prod-dg76j-0 -n tailscale
Defaulted container "tailscale" out of: tailscale, sysctler (init)
boot: 2024/01/04 11:46:39 Failed to enable IP forwarding: invalid subnet route: netip.ParsePrefix(""): no '/'

Updates#cleanup

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
@irbekrm irbekrm merged commit 3a9450b into main Jan 4, 2024
46 checks passed
@irbekrm irbekrm deleted the irbekrm/fix_containerboot branch January 4, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants