From f15292a08a6672728ee868d240b8c5484e00d863 Mon Sep 17 00:00:00 2001 From: Paul Yu Date: Tue, 21 Jan 2025 21:06:04 -0500 Subject: [PATCH] do not pass gwip --- cns/middlewares/k8sSwiftV2_windows.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cns/middlewares/k8sSwiftV2_windows.go b/cns/middlewares/k8sSwiftV2_windows.go index 09d7d15667..58cfdf8144 100644 --- a/cns/middlewares/k8sSwiftV2_windows.go +++ b/cns/middlewares/k8sSwiftV2_windows.go @@ -72,13 +72,9 @@ func (k *K8sSWIFTv2Middleware) addDefaultRoute(podIPInfo *cns.PodIpInfo, gateway func (k *K8sSWIFTv2Middleware) addRoutes(cidrs []string) []cns.Route { routes := make([]cns.Route, len(cidrs)) for i, cidr := range cidrs { - ip, _, err := net.ParseCIDR(cidr) - if err != nil { - return nil - } routes[i] = cns.Route{ IPAddress: cidr, - GatewayIPAddress: ip.String(), + GatewayIPAddress: "", // gateway IP is not required for infraNIC } } return routes