summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-03-22 15:40:54 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-03-27 14:43:54 +0900
commit64ed2f5f72e531d56285d7208da6e25be8f80ac5 (patch)
tree6693c979d7176d751c81e74d137475982f553f2b /config
parentf6648758080cbe139a4345a384243ede52bec6bf (diff)
config/default: Fix the default for Zebra.Config.Version
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'config')
-rw-r--r--config/default.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go
index 626c9ab8..a95b535b 100644
--- a/config/default.go
+++ b/config/default.go
@@ -252,6 +252,9 @@ func setDefaultConfigValuesWithViper(v *viper.Viper, b *BgpConfigSet) error {
if b.Zebra.Config.Url == "" {
b.Zebra.Config.Url = "unix:/var/run/quagga/zserv.api"
}
+ if b.Zebra.Config.Version < 2 || 3 > b.Zebra.Config.Version {
+ b.Zebra.Config.Version = 2
+ }
if !v.IsSet("zebra.config.nexthop-trigger-enable") && !b.Zebra.Config.NexthopTriggerEnable && b.Zebra.Config.Version > 2 {
b.Zebra.Config.NexthopTriggerEnable = true
}