diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-05-17 15:38:43 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-05-22 13:12:02 +0900 |
commit | 76ba8fcbda9480f9356d1733799974771f0280b0 (patch) | |
tree | af3b5917063491b238cb4b00cea6dc6e185c601a /server/peer.go | |
parent | c37b50a024f4b90edf390b3f60d3df0f6c1901e2 (diff) |
server/peer: Number of filtered routes to advertise
This patch extend the "AdjTable" container to store the number of the
"filtered" routes which should not be advertised to the given neighbor.
This routes mean the filterd routes because of RTC, VRFs, policy and
other constraints.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/peer.go b/server/peer.go index 5e04ccf6..6ead5fbe 100644 --- a/server/peer.go +++ b/server/peer.go @@ -543,8 +543,9 @@ func (peer *Peer) ToConfig(getAdvertised bool) *config.Neighbor { if peer.fsm.state == bgp.BGP_FSM_ESTABLISHED { rfList := peer.configuredRFlist() if getAdvertised { - pathList, _ := peer.getBestFromLocal(rfList) + pathList, filtered := peer.getBestFromLocal(rfList) conf.State.AdjTable.Advertised = uint32(len(pathList)) + conf.State.AdjTable.Filtered = uint32(len(filtered)) } else { conf.State.AdjTable.Advertised = 0 } |