From 0a9375a40e84a1bb83aafdaf8a164bdf29f1513f Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Tue, 16 Aug 2016 03:47:03 +0000 Subject: api: support address family filtering of MonitorRib API the feature was somehow dropped Signed-off-by: ISHIDA Wataru --- api/grpc_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/grpc_server.go') diff --git a/api/grpc_server.go b/api/grpc_server.go index 2b8ae0c8..c8138cef 100644 --- a/api/grpc_server.go +++ b/api/grpc_server.go @@ -300,7 +300,7 @@ func (s *Server) MonitorRib(arg *Table, stream GobgpApi_MonitorRibServer) error sendPath := func(pathList []*table.Path) error { dsts := make(map[string]*Destination) for _, path := range pathList { - if path == nil { + if path == nil || (arg.Family != 0 && bgp.RouteFamily(arg.Family) != path.GetRouteFamily()) { continue } if dst, y := dsts[path.GetNlri().String()]; y { -- cgit v1.2.3