diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-21 10:21:54 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-21 10:21:54 +0900 |
commit | 95619d069070cd820171f1cd3d88088dbc909c52 (patch) | |
tree | 722127af70df1733d69f23068ddd6e4c49236557 /server/server.go | |
parent | 0e64f7c080fafb61dd97023bb25e0c59b53b7556 (diff) |
server: apply policy before sending for ROUTE_REFRESH
Rather than just sending routes in the AdjOut, apply policies to
routes in the Loc and sends them.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/server.go b/server/server.go index 5f6ec58a..60aa4d3d 100644 --- a/server/server.go +++ b/server/server.go @@ -731,7 +731,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *fsmMsg, incoming chan * } server.broadcastMsgs = append(server.broadcastMsgs, m) } - pathList, _ := peer.getBestFromLocal() + pathList, _ := peer.getBestFromLocal(peer.configuredRFlist()) if len(pathList) > 0 { peer.adjRib.UpdateOut(pathList) msgs = append(msgs, newSenderMsg(peer, table.CreateUpdateMsgFromPaths(pathList))) @@ -1487,9 +1487,9 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg { logOp(grpcReq.Name, "Neighbor soft reset out") } for _, peer := range peers { - peer.adjRib.DropOut(peer.configuredRFlist()) - - pathList, filtered := peer.getBestFromLocal() + rfList := peer.configuredRFlist() + peer.adjRib.DropOut(rfList) + pathList, filtered := peer.getBestFromLocal(rfList) if len(pathList) > 0 { peer.adjRib.UpdateOut(pathList) msgs = append(msgs, newSenderMsg(peer, table.CreateUpdateMsgFromPaths(pathList))) |