Skip to content

Comments

Make parseRemoteAddr handle IPv6 addresses#389

Open
mikkeloscar wants to merge 1 commit intojtblin:mainfrom
mikkeloscar:fix-parseRemoteAddr-ipv6
Open

Make parseRemoteAddr handle IPv6 addresses#389
mikkeloscar wants to merge 1 commit intojtblin:mainfrom
mikkeloscar:fix-parseRemoteAddr-ipv6

Conversation

@mikkeloscar
Copy link
Contributor

What this PR does / why we need it:

This fixes the function parseRemoteAddr to be compatible with both IPv4 and IPv6 addresses. This enables kube2iam to work in an IPv6 enabled cluster where the pod IPs and thereby source IP/RemoteAddr would be IPv6. Without the fix, the RemoteAddr is parsed as "" and is not mapped to the pod making the call.

Additionally it adds the address to an error so it's easier to debug issues.

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes:

Checklist chart

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Chart Version bumped
  • Variables are documented in the README.md

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant