summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/config/default.go
diff options
context:
space:
mode:
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