summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-08-03 10:48:22 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-08-08 14:11:14 +0900
commitb1dee08b9062644368783f0900b75d66b44d1ca1 (patch)
tree64d096bd2a175ce68f3e9c539d576b3cb6c92979 /config
parentfed596b613821b2fca0980614ff9e5bcd1598df2 (diff)
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 <iwase.yusuke0@gmail.com>
Diffstat (limited to 'config')
-rw-r--r--config/default.go2
1 files changed, 1 insertions, 1 deletions
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