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

Use generics for CIDRTrees to avoid casting issues #1004

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

nbrownus
Copy link
Collaborator

@nbrownus nbrownus commented Nov 1, 2023

Had a report in Slack of an issue with use_system_route_table. Figured it would be best to make the CIDRTrees safer to use

panic: interface conversion: interface {} is *interface {}, not iputil.VpnIp

goroutine 83 [running, locked to thread]:
github.com/slackhq/nebula/overlay.(*tun).RouteFor(0xc000000240?, 0x0?)
        github.com/slackhq/nebula/overlay/tun_linux.go:159 +0x85
github.com/slackhq/nebula.(*Interface).getOrHandshake(0xc000202000, 0xc?, 0xc?)
        github.com/slackhq/nebula/inside.go:113 +0x45
github.com/slackhq/nebula.(*Interface).consumeInsidePacket(0xc000202000, {0xc00045d400, 0x3c, 0x2329}, 0xc0000133b0, {0xc0000133c0, 0xc, 0xc}, {0xc00045f900, 0x2329, ...}, ...)
        github.com/slackhq/nebula/inside.go:47 +0x22a
github.com/slackhq/nebula.(*Interface).listenIn(0xc000202000, {0x7f7e7ddbb838, 0xc0000acb80}, 0x0?)
        github.com/slackhq/nebula/interface.go:290 +0x14b
created by github.com/slackhq/nebula.(*Interface).run in goroutine 1
        github.com/slackhq/nebula/interface.go:248 +0x99

wadey
wadey previously approved these changes Nov 2, 2023
@wadey wadey added this to the v1.8.0 milestone Nov 2, 2023
@nbrownus nbrownus merged commit 5181cb0 into master Nov 2, 2023
6 checks passed
@nbrownus nbrownus deleted the generic-cidrtree branch November 2, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants