mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Add check for IPv6 '::' when calculating kube-proxy's node IP
kube-proxy currently checks for a bind address of 0.0.0.0 (IPv4 all-zeros) when calculating kube-proxy's node IP, but it does not check for an address of '::' (IPv6 all-zeros). For either of those all-zeros addresses, the node IP should be determined based on the hostname, rather than using the address directly. Also added a helpful log message when the kube-proxy protocol is determined to be IPv6. fixes #52613
This commit is contained in:
@@ -942,7 +942,7 @@ func iptablesFlush(ipt iptables.Interface) error {
|
||||
var zeroIPv4 = net.ParseIP("0.0.0.0")
|
||||
var localhostIPv4 = net.ParseIP("127.0.0.1")
|
||||
|
||||
var zeroIPv6 = net.ParseIP("::0")
|
||||
var zeroIPv6 = net.ParseIP("::")
|
||||
var localhostIPv6 = net.ParseIP("::1")
|
||||
|
||||
// Build a slice of iptables args that are common to from-container and from-host portal rules.
|
||||
|
||||
Reference in New Issue
Block a user