summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/grpc_server.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go
index 33ee13c5..7fe72c35 100644
--- a/api/grpc_server.go
+++ b/api/grpc_server.go
@@ -896,12 +896,11 @@ func NewNeighborFromAPIStruct(a *Peer) (*config.Neighbor, error) {
},
})
}
-
for _, pl := range a.Conf.PrefixLimits {
- for _, f := range pconf.AfiSafis {
+ for i, f := range pconf.AfiSafis {
if f.Config.AfiSafiName == config.AfiSafiType(bgp.RouteFamily(pl.Family).String()) {
- f.PrefixLimit.Config.MaxPrefixes = pl.MaxPrefixes
- f.PrefixLimit.Config.ShutdownThresholdPct = config.Percentage(pl.ShutdownThresholdPct)
+ pconf.AfiSafis[i].PrefixLimit.Config.MaxPrefixes = pl.MaxPrefixes
+ pconf.AfiSafis[i].PrefixLimit.Config.ShutdownThresholdPct = config.Percentage(pl.ShutdownThresholdPct)
}
}
}