From b1dee08b9062644368783f0900b75d66b44d1ca1 Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Thu, 3 Aug 2017 10:48:22 +0900 Subject: config/default: Fix unfilled "neighbors.afi-safis.config.enabled" Currently, if "neighbors.afi-safis.config.enabled" is omitted, this field will not initialised as expected when GoBGPd reads config file, but will initialised when AddNeighbor API is called. This cause the miss comparison whether reloaded neighbor config is updated or not (always determined updated). This patch fixes the condition more strictly and solves this problem. Signed-off-by: IWASE Yusuke --- config/default.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/default.go') diff --git a/config/default.go b/config/default.go index d0be6d6b..1513320e 100644 --- a/config/default.go +++ b/config/default.go @@ -205,7 +205,7 @@ func setDefaultNeighborConfigValuesWithViper(v *viper.Viper, n *Neighbor, asn ui vv.Set("afi-safi", afs[i]) } af.State.AfiSafiName = af.Config.AfiSafiName - if !vv.IsSet("afi-safi.config") { + if !vv.IsSet("afi-safi.config.enabled") { af.Config.Enabled = true } af.MpGracefulRestart.State.Enabled = af.MpGracefulRestart.Config.Enabled -- cgit v1.2.3