Skip to content

Add support for IPv6 targets to network-latency and network-packet-loss faults #4645

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

Merged
merged 1 commit into from
May 21, 2025

Conversation

amogh09
Copy link
Contributor

@amogh09 amogh09 commented May 20, 2025

Summary

This change extends support for network-latency and network-packet-loss faults to IPv6 targets. Today only IPv4 targets are accepted by these APIs but after this change IPv6 targets are accepted as well.

Implementation details

Request validation is changed for the APIs so that they accept IPv6 and IPv6 CIDR Sources (targets) and SourcesToFilter (protected targets).

tc commands used for network-latency and network-packet-loss faults are updated so that -

  1. Protocol specified in the filter add commands is all instead of ip. all applies to all protocols whereas ip applies to IPv4 only.
  2. Matcher specified in the filter add commands uses ip selector for IPv4 targets and ip6 for IPv6 targets.

Testing

Performed a variety of manual tests including the cases below.

  1. IPv6 target only with and without a target to filter (protect).
  2. IPv6 CIDR target only with and without a target to filter (protect).
  3. IPv4 and IPv6 targets with no targets to filter.
  4. IPv4 and IPv6 targets with an IPv4 target protected.
  5. IPv4 and IPv6 targets with an IPv6 target protected.

In call cases above, the faults worked as expected. There was no network degradation for traffic to filtered targets but there was expected network degradation for traffic to destinations matching the targets.

New tests cover the changes: yes

Description for the changelog

Enhancement: Add support for IPv6 targets to network-latency and network-packet-loss faults

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?

No

Does this PR include the addition of new environment variables in the README?

No

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@amogh09 amogh09 changed the title Ipv6 faults Support for IPv6 targets for network-latency and network-packet-loss faults May 20, 2025
@amogh09 amogh09 marked this pull request as ready for review May 20, 2025 21:22
@amogh09 amogh09 requested a review from a team as a code owner May 20, 2025 21:22
@amogh09 amogh09 changed the title Support for IPv6 targets for network-latency and network-packet-loss faults Add support for IPv6 targets to network-latency and network-packet-loss faults May 20, 2025
@amogh09 amogh09 merged commit 7a22451 into aws:dev May 21, 2025
40 checks passed
xxx0624 pushed a commit to xxx0624/amazon-ecs-agent that referenced this pull request May 28, 2025
timj-hh pushed a commit to timj-hh/amazon-ecs-agent that referenced this pull request Jul 19, 2025
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.

5 participants