summaryrefslogtreecommitdiffhomepage
path: root/server/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/peer.go')
-rw-r--r--server/peer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/peer.go b/server/peer.go
index cc71063a..6f4f6992 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -240,8 +240,8 @@ func (peer *Peer) handleUpdate(e *FsmMsg) ([]*table.Path, []bgp.RouteFamily, *bg
peer.adjRibIn.Update(e.PathList)
for _, family := range peer.fsm.pConf.AfiSafis {
k, _ := bgp.GetRouteFamily(string(family.AfiSafiName))
- count := peer.adjRibIn.Count([]bgp.RouteFamily{k})
if maxPrefixes := int(family.PrefixLimit.Config.MaxPrefixes); maxPrefixes > 0 {
+ count := peer.adjRibIn.Count([]bgp.RouteFamily{k})
pct := int(family.PrefixLimit.Config.ShutdownThresholdPct)
if pct > 0 && !peer.prefixLimitWarned && count > (maxPrefixes*pct/100) {
peer.prefixLimitWarned = true