diff options
author | Hitoshi Irino <irino@sfc.wide.ad.jp> | 2019-07-21 15:08:23 +0900 |
---|---|---|
committer | Hitoshi Irino <irino@sfc.wide.ad.jp> | 2019-07-21 15:25:50 +0900 |
commit | 7284d4cf8b3f9ecd03068dfa3ab3d433860b5089 (patch) | |
tree | a3e65926529501e19a33a8181fa4e14cd17d792b /cmd | |
parent | 426709893303ecd0ff189cfe0b24eda89edef95e (diff) |
Avoid panic by receiving vpnv6 prefixes with zebra reported in issue #2113
- Additionally bug fix which avoid panic caused by displaying vpnv6 prefixes using gobgp vrf rib
- Supporting FRRouting 7.1.x
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gobgp/neighbor.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/gobgp/neighbor.go b/cmd/gobgp/neighbor.go index 2a1075da..ef8e904b 100644 --- a/cmd/gobgp/neighbor.go +++ b/cmd/gobgp/neighbor.go @@ -925,7 +925,8 @@ func showNeighborRib(r string, name string, args []string) error { for _, dst := range rib { prefix := dst.Prefix if t == api.TableType_VRF { - s := strings.Split(prefix, ":") + // extract prefix from original which is RD(AS:VRF):IPv4 or IPv6 address + s := strings.SplitN(prefix, ":", 3) prefix = s[len(s)-1] } _, p, _ := net.ParseCIDR(prefix) |