From 1b2afe9b0765863fa8139fec59f3cbc16fc3c69f Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Thu, 21 Nov 2024 09:51:57 +0800 Subject: [PATCH] fix: FLB support IPv6 external address (#455) * fix: support IPv6 external address Signed-off-by: Lin Yang * chore: prepare release v1.2.9-alpha.1 Signed-off-by: Lin Yang * Revert "chore: prepare release v1.2.9-alpha.1" This reverts commit 23a5b7d53cf8f7ba8b9171719393e11521be834b. --------- Signed-off-by: Lin Yang --- pkg/controllers/flb/utils.go | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/pkg/controllers/flb/utils.go b/pkg/controllers/flb/utils.go index bc08ed04..3a29674b 100644 --- a/pkg/controllers/flb/utils.go +++ b/pkg/controllers/flb/utils.go @@ -2,7 +2,6 @@ package flb import ( "fmt" - "net" "strings" "github.com/flomesh-io/fsm/pkg/constants" @@ -36,20 +35,20 @@ func lbIPs(addresses []string) []string { return nil } - ips := make([]string, 0) - for _, addr := range addresses { - if strings.Contains(addr, ":") { - host, _, err := net.SplitHostPort(addr) - if err != nil { - return nil - } - ips = append(ips, host) - } else { - ips = append(ips, addr) - } - } + //ips := make([]string, 0) + //for _, addr := range addresses { + // if strings.Contains(addr, ":") { + // host, _, err := net.SplitHostPort(addr) + // if err != nil { + // return nil + // } + // ips = append(ips, host) + // } else { + // ips = append(ips, addr) + // } + //} - return ips + return addresses } func getValidAlgo(value string) string {