diff options
-rw-r--r-- | config/bgp_configs.go | 5 | ||||
-rw-r--r-- | server/peer.go | 3 | ||||
-rw-r--r-- | tools/pyang_plugins/gobgp.yang | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go index 9deb98dd..45515d00 100644 --- a/config/bgp_configs.go +++ b/config/bgp_configs.go @@ -2100,6 +2100,8 @@ func (lhs *Timers) Equal(rhs *Timers) bool { type AdjTable struct { // original -> gobgp:ADVERTISED Advertised uint32 `mapstructure:"advertised" json:"advertised,omitempty"` + // original -> gobgp:FILTERED + Filtered uint32 `mapstructure:"filtered" json:"filtered,omitempty"` // original -> gobgp:RECEIVED Received uint32 `mapstructure:"received" json:"received,omitempty"` // original -> gobgp:ACCEPTED @@ -2113,6 +2115,9 @@ func (lhs *AdjTable) Equal(rhs *AdjTable) bool { if lhs.Advertised != rhs.Advertised { return false } + if lhs.Filtered != rhs.Filtered { + return false + } if lhs.Received != rhs.Received { return false } 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 } diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang index b9bd5f6c..25299cc2 100644 --- a/tools/pyang_plugins/gobgp.yang +++ b/tools/pyang_plugins/gobgp.yang @@ -202,6 +202,10 @@ module gobgp { type uint32; } + leaf FILTERED { + type uint32; + } + leaf RECEIVED { type uint32; } |