From 494209d3cf3e9177c2d311d6b7c063e67810393a Mon Sep 17 00:00:00 2001 From: KillMaster9 Date: Mon, 17 Jul 2023 12:51:54 +0800 Subject: [PATCH] change log (#3042) * change log * check param for argEbgpMultihopTtl --- pkg/speaker/config.go | 3 +++ pkg/speaker/subnet.go | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/speaker/config.go b/pkg/speaker/config.go index 7c50d451f87..354f1fa6fd0 100644 --- a/pkg/speaker/config.go +++ b/pkg/speaker/config.go @@ -110,6 +110,9 @@ func ParseFlags() (*Configuration, error) { if *argNeighborIPv6Address != "" && net.ParseIP(*argNeighborIPv6Address).To16() == nil { return nil, fmt.Errorf("invalid neighbor-ipv6-address format: %s", *argNeighborIPv6Address) } + if *argEbgpMultihopTtl < 1 || *argEbgpMultihopTtl > 255 { + return nil, errors.New("the bgp MultihopTtl must be in the range 1 to 255") + } config := &Configuration{ AnnounceClusterIP: *argAnnounceClusterIP, diff --git a/pkg/speaker/subnet.go b/pkg/speaker/subnet.go index 1c885022e89..aa908b975c8 100644 --- a/pkg/speaker/subnet.go +++ b/pkg/speaker/subnet.go @@ -44,7 +44,6 @@ func isClusterIPService(svc *v1.Service) bool { len(svc.Spec.ClusterIP) != 0 } -// TODO: ipv4 only, need ipv6/dual-stack support later func (c *Controller) syncSubnetRoutes() { maskMap := map[string]int{kubeovnv1.ProtocolIPv4: 32, kubeovnv1.ProtocolIPv6: 128} bgpExpected, bgpExists := make(map[string][]string), make(map[string][]string)