diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-11-25 21:02:55 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-11-25 23:27:02 +0900 |
commit | a5763c20d4ab411a3d6375cad32c8c8255c43a64 (patch) | |
tree | ecb2eaa8515b13f641c854993acecb42d522e3a7 /internal/pkg/config/default.go | |
parent | 7ec6a96962637d0c6f525ec6e8dd517f785842c7 (diff) |
api: remove AddPaths from Peer and PeerGroup
AddPaths in AfiSafi should be used; it can handle configuration per
family.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'internal/pkg/config/default.go')
-rw-r--r-- | internal/pkg/config/default.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/pkg/config/default.go b/internal/pkg/config/default.go index 31dd1b17..b03eec8e 100644 --- a/internal/pkg/config/default.go +++ b/internal/pkg/config/default.go @@ -197,11 +197,15 @@ func setDefaultNeighborConfigValuesWithViper(v *viper.Viper, n *Neighbor, g *Glo } n.AfiSafis[i].MpGracefulRestart.State.Enabled = n.AfiSafis[i].MpGracefulRestart.Config.Enabled if !vv.IsSet("afi-safi.add-paths.config.receive") { - n.AfiSafis[i].AddPaths.Config.Receive = n.AddPaths.Config.Receive + if n.AddPaths.Config.Receive == true { + n.AfiSafis[i].AddPaths.Config.Receive = n.AddPaths.Config.Receive + } } n.AfiSafis[i].AddPaths.State.Receive = n.AfiSafis[i].AddPaths.Config.Receive if !vv.IsSet("afi-safi.add-paths.config.send-max") { - n.AfiSafis[i].AddPaths.Config.SendMax = n.AddPaths.Config.SendMax + if n.AddPaths.Config.SendMax != 0 { + n.AfiSafis[i].AddPaths.Config.SendMax = n.AddPaths.Config.SendMax + } } n.AfiSafis[i].AddPaths.State.SendMax = n.AfiSafis[i].AddPaths.Config.SendMax } |