only add local endpoints into the hairpin ipset

pull/58/head
Hong Zhiguo 2018-07-13 13:00:50 +08:00
parent b883f4cff8
commit 647edfd6ed
1 changed files with 3 additions and 0 deletions

View File

@ -761,6 +761,9 @@ func (proxier *Proxier) syncProxyRules() {
glog.Errorf("Failed to cast BaseEndpointInfo %q", e.String())
continue
}
if !ep.IsLocal {
continue
}
epIP := ep.IP()
epPort, err := ep.Port()
// Error parsing this endpoint has been logged. Skip to next endpoint.