Skip to content

mobile: Filter reserved IP address ranges in IPv6 probing#40345

Merged
abeyad merged 3 commits intoenvoyproxy:mainfrom
abeyad:ipv6-probing-reserved
Jul 22, 2025
Merged

mobile: Filter reserved IP address ranges in IPv6 probing#40345
abeyad merged 3 commits intoenvoyproxy:mainfrom
abeyad:ipv6-probing-reserved

Conversation

@abeyad
Copy link
Copy Markdown
Contributor

@abeyad abeyad commented Jul 22, 2025

IPv6 probing will now filter out:

  • Link-local IP addresses
  • Site-local IPv6 addresses
  • Unique Local IPv6 addresses
  • Teredo addresses

This is the same as Chromium's logic for IPv6 connectivity probing: https://source.chromium.org/chromium/chromium/src/+/main:net/dns/host_resolver_manager.cc;l=1572-1581;drc=d0260a368e65b2be56d179d21fab90976fd494b8.

Though it doesn't seem like Chromium filters out site-local addresses, local testing has shown that the IPv6 probe socket will successfully connect but the local address will be site-local on non-IPv6 networks/machines.

IPv6 probing will now filter out:
  * Link-local IP addresses
  * Site-local IPv6 addresses
  * Unique Local IPv6 addresses
  * Teredo addresses

This is the same as Chromium's logic for IPv6 connectivity probing:
https://source.chromium.org/chromium/chromium/src/+/main:net/dns/host_resolver_manager.cc;l=1572-1581;drc=d0260a368e65b2be56d179d21fab90976fd494b8.

Though it doesn't seem like Chromium filters out site-local addresses,
local testing has shown that the IPv6 probe socket will successfully
connect but the local address will be site-local on non-IPv6
networks/machines.

Signed-off-by: Ali Beyad <abeyad@google.com>
@abeyad abeyad enabled auto-merge (squash) July 22, 2025 19:04
@abeyad
Copy link
Copy Markdown
Contributor Author

abeyad commented Jul 22, 2025

cc @danzh2010 @RenjieTang

abeyad added 2 commits July 22, 2025 19:12
Signed-off-by: Ali Beyad <abeyad@google.com>
Signed-off-by: Ali Beyad <abeyad@google.com>
@abeyad
Copy link
Copy Markdown
Contributor Author

abeyad commented Jul 22, 2025

/assign-from @envoyproxy/senior-maintainers

@repokitteh-read-only
Copy link
Copy Markdown

@envoyproxy/senior-maintainers assignee is @RyanTheOptimist

🐱

Caused by: a #40345 (comment) was created by @abeyad.

see: more, trace.

@abeyad
Copy link
Copy Markdown
Contributor Author

abeyad commented Jul 22, 2025

/assign @adisuissa

since Ryan is OOO

Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OVerall LGTM!
2 questions:

  • should there be tests to cover the different error cases?
  • as this is mobile-only change, does this need to wait until the new Envoy release is cut?

@abeyad
Copy link
Copy Markdown
Contributor Author

abeyad commented Jul 22, 2025

OVerall LGTM! 2 questions:

Thanks for the review Adi!

  • should there be tests to cover the different error cases?

Unfortunately, this class doesn't have unit tests, and it's a bit challenging to mock. We figured we'd try this out in an experimental arm in YouTube and see if it improves IPv6 probing.

  • as this is mobile-only change, does this need to wait until the new Envoy release is cut?

I don't think it needs to wait, since it shouldn't effect any other users other than Google internally with Envoy Mobile. Would you feel more comfortable with waiting?

@adisuissa
Copy link
Copy Markdown
Contributor

I don't think it needs to wait, since it shouldn't effect any other users other than Google internally with Envoy Mobile. Would you feel more comfortable with waiting?

That's up to you as an Envoy-Mobile maintainer. I'm not sure what the latest release process is for Envoy-mobile.
I saw this, but AFAICT the mobile versions are either non-existent or very old. ISTR that Alyssa said something about Envoy-mobile not having a release cadence, and in that case the PR can be merged now (but I may be misremembering).
I'm going to LGTM, and leave it to you to decide. If there are Envoy-Mobile users that are dependent on the Envoy-version, it may be beneficial to wait the ~1 day until the new version is cut.

@adisuissa adisuissa disabled auto-merge July 22, 2025 21:21
@abeyad
Copy link
Copy Markdown
Contributor Author

abeyad commented Jul 22, 2025

AFAICT the mobile versions are either non-existent or very old

Yes, we haven't been cutting Envoy Mobile releases in a long time, so I think it's safe to merge now, thanks again!

@abeyad abeyad merged commit 6becd01 into envoyproxy:main Jul 22, 2025
24 checks passed
@abeyad abeyad deleted the ipv6-probing-reserved branch July 22, 2025 21:28
abeyad added a commit that referenced this pull request Aug 20, 2025
…40802)

Adds two runtime guards to experiment with filtering reserved IP ranges
in the IPv6 probing check that were introduced in
#40345:

  1. `envoy_reloadable_features_mobile_ipv6_probe_simple_filtering`
  2. `envoy_reloadable_features_mobile_ipv6_probe_advanced_filtering`

Signed-off-by: Ali Beyad <abeyad@google.com>
melginaldi pushed a commit to melginaldi/envoy that referenced this pull request Aug 21, 2025
…nvoyproxy#40802)

Adds two runtime guards to experiment with filtering reserved IP ranges
in the IPv6 probing check that were introduced in
envoyproxy#40345:

  1. `envoy_reloadable_features_mobile_ipv6_probe_simple_filtering`
  2. `envoy_reloadable_features_mobile_ipv6_probe_advanced_filtering`

Signed-off-by: Ali Beyad <abeyad@google.com>
Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
melginaldi pushed a commit to melginaldi/envoy that referenced this pull request Aug 26, 2025
…nvoyproxy#40802)

Adds two runtime guards to experiment with filtering reserved IP ranges
in the IPv6 probing check that were introduced in
envoyproxy#40345:

  1. `envoy_reloadable_features_mobile_ipv6_probe_simple_filtering`
  2. `envoy_reloadable_features_mobile_ipv6_probe_advanced_filtering`

Signed-off-by: Ali Beyad <abeyad@google.com>
Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
wtzhang23 pushed a commit to wtzhang23/envoy that referenced this pull request Aug 27, 2025
…nvoyproxy#40802)

Adds two runtime guards to experiment with filtering reserved IP ranges
in the IPv6 probing check that were introduced in
envoyproxy#40345:

  1. `envoy_reloadable_features_mobile_ipv6_probe_simple_filtering`
  2. `envoy_reloadable_features_mobile_ipv6_probe_advanced_filtering`

Signed-off-by: Ali Beyad <abeyad@google.com>
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.

3 participants