-
Dane LeBlanc authored
The following changes are proposed for the iptables proxier: * There are three places where a string specifying IP:port is parsed using something like this: if index := strings.Index(e.endpoint, ":"); index != -1 { This will fail for IPv6 since V6 addresses contain colons. Also, the V6 address is expected to be surrounded by square brackets (i.e. []:). Fix this by replacing call to Index with call to LastIndex() and stripping out square brackets. * The String() method for the localPort struct should put square brackets around IPv6 addresses. * The logging in the merge() method for proxyServiceMap should put brackets around IPv6 addresses. * There are several places where filterRules destination is hardcoded to /32. This should be a /128 for IPv6 case. * Add IPv6 unit test cases fixes #48550
5fbc9e45