Unverified Commit 15631938 authored by Lars Ekman's avatar Lars Ekman Committed by Martin Vladev

Only handle addresses of the own ip family

parent f5d6de39
...@@ -1683,7 +1683,12 @@ func (proxier *Proxier) cleanLegacyService(activeServices map[string]bool, curre ...@@ -1683,7 +1683,12 @@ func (proxier *Proxier) cleanLegacyService(activeServices map[string]bool, curre
func (proxier *Proxier) getLegacyBindAddr(activeBindAddrs map[string]bool, currentBindAddrs []string) map[string]bool { func (proxier *Proxier) getLegacyBindAddr(activeBindAddrs map[string]bool, currentBindAddrs []string) map[string]bool {
legacyAddrs := make(map[string]bool) legacyAddrs := make(map[string]bool)
isIpv6 := utilnet.IsIPv6(proxier.nodeIP)
for _, addr := range currentBindAddrs { for _, addr := range currentBindAddrs {
addrIsIpv6 := utilnet.IsIPv6(net.ParseIP(addr))
if addrIsIpv6 && !isIpv6 || !addrIsIpv6 && isIpv6 {
continue
}
if _, ok := activeBindAddrs[addr]; !ok { if _, ok := activeBindAddrs[addr]; !ok {
legacyAddrs[addr] = true legacyAddrs[addr] = true
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment