summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/server.go b/server/server.go
index f41066a9..261f3e9a 100644
--- a/server/server.go
+++ b/server/server.go
@@ -608,6 +608,8 @@ func (server *BgpServer) broadcastBests(bests []*table.Path) {
}
}
+ rf := path.GetRouteFamily()
+
result := &GrpcResponse{
Data: &api.Destination{
Prefix: path.GetNlri().String(),
@@ -625,11 +627,13 @@ func (server *BgpServer) broadcastBests(bests []*table.Path) {
remainReqs = append(remainReqs, req)
continue
}
- m := &broadcastGrpcMsg{
- req: req,
- result: result,
+ if req.RouteFamily == bgp.RouteFamily(0) || req.RouteFamily == rf {
+ m := &broadcastGrpcMsg{
+ req: req,
+ result: result,
+ }
+ server.broadcastMsgs = append(server.broadcastMsgs, m)
}
- server.broadcastMsgs = append(server.broadcastMsgs, m)
remainReqs = append(remainReqs, req)
}
server.broadcastReqs = remainReqs