Skip to content

Commit 99288e4

Browse files
Update azure-ipam/ipconfig/ipconfig.go
Co-authored-by: Copilot <[email protected]> Signed-off-by: NihaNallappagari <[email protected]>
1 parent 61784dc commit 99288e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

azure-ipam/ipconfig/ipconfig.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ func ProcessIPConfigsResp(resp *cns.IPConfigsResponse) (*[]netip.Prefix, *[]net.
8989
gatewayIP = net.ParseIP(resp.PodIPInfo[i].NetworkContainerPrimaryIPConfig.GatewayIPv6Address)
9090
}
9191

92-
if gatewayIP != nil {
92+
if gatewayIP == nil {
93+
fmt.Printf("Warning: Failed to parse gateway IP for PodIPInfo[%d]\n", i)
94+
} else {
9395
gatewaysIPs[i] = gatewayIP
9496
} else {
9597
logger.Printf("gatewayIP is nil or gateway ip parse failed for pod ip %s", resp.PodIPInfo[i].PodIPConfig.IPAddress)

0 commit comments

Comments
 (0)