From efeb8c51fbab58d378c7c5a8cb29099e9ae89449 Mon Sep 17 00:00:00 2001 From: Hitoshi Irino Date: Sun, 26 Jul 2020 22:37:04 +0900 Subject: zebra: refactoring and fix bug and add processing messageBackupNexthop (added in frr7.4) - Move function for checking softwareName from internal/pkg/config/default.go to internal/pkg/zebra/zapi.go. - Delete support for frr7.1. - Fix bug by inverse processing MessageMTU and messageTag, and add messageTableId in decodeFromBytes and serialize of IPRouteBody. - Add processing messageBackupNexthop (which is added in frr7.4) in decodeFromBytes and serialize of IPRouteBody. - Update document. --- internal/pkg/config/default.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'internal/pkg/config/default.go') diff --git a/internal/pkg/config/default.go b/internal/pkg/config/default.go index 7727bf78..3d723cd9 100644 --- a/internal/pkg/config/default.go +++ b/internal/pkg/config/default.go @@ -421,16 +421,7 @@ func setDefaultConfigValuesWithViper(v *viper.Viper, b *BgpConfigSet) error { b.Zebra.Config.NexthopTriggerDelay = 5 } - //SoftwareName for Zebra - allowableZebraSoftwareName := []string{"", "quagga", "frr3", "frr4", "frr5", "frr6", "frr7", "frr7.1", "frr7.2", "frr7.3", "cumulus"} - isAllowable := false - for _, allowable := range allowableZebraSoftwareName { - if b.Zebra.Config.SoftwareName == allowable { - isAllowable = true - break - } - } - if !isAllowable { + if !zebra.IsAllowableSoftwareName(b.Zebra.Config.Version, b.Zebra.Config.SoftwareName) { b.Zebra.Config.SoftwareName = "" } -- cgit v1.2.3