Skip to content

Commit

Permalink
fix dualStack network checkgw raise panic (#3392)
Browse files Browse the repository at this point in the history
Signed-off-by: yuanliu <yuanliu_yewu@cmss.chinamobile.com>
  • Loading branch information
lynn901 authored and oilbeater committed Nov 9, 2023
1 parent 9f08f4a commit 005b92b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions pkg/daemon/ovs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,11 @@ func waitNetworkReady(nic, ipAddr, gateway string, underlayGateway, verbose bool
klog.Infof("MAC addresses of gateway %s is %s", gw, mac.String())
klog.Infof("network %s with gateway %s is ready for interface %s after %d checks", ips[i], gw, nic, count)
}
maxRetry -= count
} else {
count, err := pingGateway(gw, src, verbose, maxRetry)
_, err := pingGateway(gw, src, verbose, maxRetry)
if err != nil {
return err
}
maxRetry -= count
}
}
return nil
Expand Down
3 changes: 1 addition & 2 deletions pkg/daemon/ovs_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,10 @@ func waitNetworkReady(nic, ipAddr, gateway string, underlayGateway, verbose bool
for i, gw := range strings.Split(gateway, ",") {
src := strings.Split(ips[i], "/")[0]
if !underlayGateway || util.CheckProtocol(gw) == kubeovnv1.ProtocolIPv6 {
count, err := pingGateway(gw, src, verbose, maxRetry)
_, err := pingGateway(gw, src, verbose, maxRetry)
if err != nil {
return err
}
maxRetry -= count
}
}
return nil
Expand Down

0 comments on commit 005b92b

Please sign in to comment.