Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with primary ENI ip lookup when an ENI has both IPv4 and IPv6 Address Assigned. #3156

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

orsenthil
Copy link
Member

What type of PR is this?

Fixes a regression introduced in this #3122

Previously we assumed the ENI (primary ENI) always will have an IPV4 and went with getting the IPv4 address.

Primary ENI will always have an IPV4 address.

However, when #3122 was introduced, we are checking ipv4Available explicitly. The way in which the ipv4 or ipv6 is checked in based on the value of IMDS metadata on MAC. It dependent on the order in which IMDS returned the value - due to using a break condition.

https://github.com/aws/amazon-vpc-cni-k8s/pull/3122/files#r1889412276

The break condition is removed and this is fixed.*

Added unit-test to catch this issue. Without the change in awsutils.gothe unit test will fail.

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