diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-04-18 13:57:39 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-04-18 13:57:39 +0900 |
commit | 86d709fa3fb7f92141d8d0cfcad633a57ecd6bde (patch) | |
tree | 2f3314a4af109469b959c547346c51abc04aeea8 /api/grpc_server.go | |
parent | 3b25c7c8508384b1dc6c55bfc6c59947efa04888 (diff) |
cli: show neighbor max prefix config
fix NewNeighborFromAPIStruct() regression.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'api/grpc_server.go')
-rw-r--r-- | api/grpc_server.go | 7 |
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) } } } |