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

Expose a global switch to disable IPV6 #55012

Merged
merged 8 commits into from
Jul 12, 2021

Conversation

antonfirsov
Copy link
Member

@antonfirsov antonfirsov commented Jul 1, 2021

Fixes #47583. Resolves #52287, #54807 and similar issues, without changing customer application code.

Introduces an AppContext switch System.Net.DisableIPv6 and environment variable DOTNET_SYSTEM_NET_DISABLEIPV6 to emulate the lack of OS-level IPv6 support. This is useful to workaround dual-stack socket issues when the OS reports support of IPv6, but some other underlying infrastructure element (typically VPN) doesn't function well with IPv6 request.

For consistency, this switch also impacts NameResolution and Ping, not only Sockets.

@ghost
Copy link

ghost commented Jul 1, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #47583. Resolves #52287, #54807 and similar issues.

Introduces an AppContext switch System.Net.DisableIPv6 and environment variable DOTNET_SYSTEM_NET_DISABLEIPV6 to emulate the lack of OS-level IPv6 support. This is useful to workaround dual-stack socket issues when the OS reports support of IPv6, but some other underlying infrastructure element (typically VPN) doesn't function well with IPv6 request.

For consistency, this switch also impacts NameResolution and Ping, not only Sockets.

Author: antonfirsov
Assignees: -
Labels:

area-System.Net

Milestone: -

@antonfirsov antonfirsov marked this pull request as draft July 1, 2021 15:47
@antonfirsov
Copy link
Member Author

antonfirsov commented Jul 1, 2021

Test failures are related, the IPv6 filtering doesn't work in NameResolutionPal.Unix, converting to draft. Fixed.

@antonfirsov antonfirsov marked this pull request as ready for review July 1, 2021 16:33
@alnikola alnikola merged commit 067aa16 into dotnet:main Jul 12, 2021
@karelz karelz added this to the 6.0.0 milestone Jul 15, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants