diff options
Diffstat (limited to 'cmd/gobgp/neighbor.go')
-rw-r--r-- | cmd/gobgp/neighbor.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/gobgp/neighbor.go b/cmd/gobgp/neighbor.go index 90d9e4f8..9ebbff67 100644 --- a/cmd/gobgp/neighbor.go +++ b/cmd/gobgp/neighbor.go @@ -943,7 +943,12 @@ func showNeighborRib(r string, name string, args []string) error { } l := make([]*d, 0, len(rib)) for _, dst := range rib { - _, p, _ := net.ParseCIDR(dst.Prefix) + prefix := dst.Prefix + if t == api.TableType_VRF { + s := strings.Split(prefix, ":") + prefix = s[len(s)-1] + } + _, p, _ := net.ParseCIDR(prefix) l = append(l, &d{prefix: p.IP, dst: dst}) } |