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

Fix 'LsTLVIPReachability Prefix Set Value' bug #2776

Closed
wants to merge 1 commit into from
Closed

Fix 'LsTLVIPReachability Prefix Set Value' bug #2776

wants to merge 1 commit into from

Conversation

eviltomorrow
Copy link

Running the following command causes a panic:
./gobgp g r -a ls -j -u localhost -p 50051

panic: runtime error: index out of range [1] with length 1 [recovered]
panic: runtime error: index out of range [1] with length 1 [recovered]
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
encoding/json.(*encodeState).marshal.func1()
/usr/lib/go/src/encoding/json/encode.go:293 +0x6d
panic({0xc39d60?, 0xc00020da28?})
/usr/lib/go/src/runtime/panic.go:770 +0x132
encoding/json.(*encodeState).marshal.func1()
/usr/lib/go/src/encoding/json/encode.go:293 +0x6d
panic({0xc39d60?, 0xc00020da28?})
/usr/lib/go/src/runtime/panic.go:770 +0x132
github.com/osrg/gobgp/v3/pkg/packet/bgp.(*LsTLVIPReachability).ToIPNet(0xc0004cbda0, 0x0)
../github.com/osrg/gobgp/pkg/packet/bgp/bgp.go:7135 +0x225
github.com/osrg/gobgp/v3/pkg/packet/bgp.(*LsPrefixDescriptor).ParseTLVs(0xc00044edb8, {0xc0004cbdc0?, 0x10?, 0xc0003192b0?}, 0x0)
../github.com/osrg/gobgp/pkg/packet/bgp/bgp.go:5545 +0x93

@eviltomorrow eviltomorrow marked this pull request as ready for review March 4, 2024 07:18
@eviltomorrow eviltomorrow changed the title fix 'LsTLVIPReachability Prefix Set Value' bug Fix 'LsTLVIPReachability Prefix Set Value' bug Mar 6, 2024
@fujita
Copy link
Member

fujita commented Mar 6, 2024

Can you please remove unrelated format changes?

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.

2 participants