From 7284d4cf8b3f9ecd03068dfa3ab3d433860b5089 Mon Sep 17 00:00:00 2001 From: Hitoshi Irino Date: Sun, 21 Jul 2019 15:08:23 +0900 Subject: 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 --- cmd/gobgp/neighbor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') 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) -- cgit v1.2.3