summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/config/default.go
diff options
context:
space:
mode:
authorHitoshi Irino <irino@sfc.wide.ad.jp>2019-05-05 20:35:52 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-05-08 08:48:26 +0900
commit7d2823d4c037caf39c7222632669210a4b6d1ed4 (patch)
treedb6523171ffe4f086629ec95108cfa2cc6766d43 /internal/pkg/config/default.go
parentcc267fad9e6410705420af220d73d25d288e8a58 (diff)
zebra: supporting FRRouting version 7
- the "version" parameter (which means ZAPI) 6 in zebra config changes supporting FRRouting version 7 instead of FRRouting version 6. - the "software-name" parameter which supports backward compatibility is added in zebra config. (GoBGP support FRRouting version 6 when "version = 6" and "software-name = frr6" is configured.)
Diffstat (limited to 'internal/pkg/config/default.go')
-rw-r--r--internal/pkg/config/default.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/pkg/config/default.go b/internal/pkg/config/default.go
index 9bec51be..7fd5b5c1 100644
--- a/internal/pkg/config/default.go
+++ b/internal/pkg/config/default.go
@@ -413,6 +413,7 @@ func setDefaultConfigValuesWithViper(v *viper.Viper, b *BgpConfigSet) error {
} else if b.Zebra.Config.Version > zebra.MaxZapiVer {
b.Zebra.Config.Version = zebra.MaxZapiVer
}
+
if !v.IsSet("zebra.config.nexthop-trigger-enable") && !b.Zebra.Config.NexthopTriggerEnable && b.Zebra.Config.Version > 2 {
b.Zebra.Config.NexthopTriggerEnable = true
}
@@ -420,6 +421,19 @@ func setDefaultConfigValuesWithViper(v *viper.Viper, b *BgpConfigSet) error {
b.Zebra.Config.NexthopTriggerDelay = 5
}
+ //SoftwareName for Zebra
+ allowableZebraSoftwareName := []string{"", "quagga", "frr3", "frr4", "frr5", "frr6", "frr7"}
+ isAllowable := false
+ for _, allowable := range allowableZebraSoftwareName {
+ if b.Zebra.Config.SoftwareName == allowable {
+ isAllowable = true
+ break
+ }
+ }
+ if !isAllowable {
+ b.Zebra.Config.SoftwareName = ""
+ }
+
list, err := extractArray(v.Get("neighbors"))
if err != nil {
return err