summaryrefslogtreecommitdiffhomepage
path: root/cmd/gobgp/neighbor.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/gobgp/neighbor.go')
-rw-r--r--cmd/gobgp/neighbor.go3
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)