diff options
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch')
| -rw-r--r-- | www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch new file mode 100644 index 0000000..0bc5dd5 --- /dev/null +++ b/www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | # Disables IPv6 probing and adds an option to change the IPv6 probing result | ||
| 2 | |||
| 3 | --- chrome/browser/ungoogled_flag_entries.h.orig | ||
| 4 | +++ chrome/browser/ungoogled_flag_entries.h | ||
| 5 | @@ -4,4 +4,8 @@ | ||
| 6 | |||
| 7 | #ifndef CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ | ||
| 8 | #define CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ | ||
| 9 | + {"set-ipv6-probe-false", | ||
| 10 | + "SetIpv6ProbeFalse", | ||
| 11 | + "Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible. ungoogled-chromium flag.", | ||
| 12 | + kOsAll, FEATURE_VALUE_TYPE(net::features::kSetIpv6ProbeFalse)}, | ||
| 13 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ | ||
| 14 | --- net/base/features.cc.orig | ||
| 15 | +++ net/base/features.cc | ||
| 16 | @@ -263,5 +263,7 @@ const base::Feature kPartitionedCookies{ | ||
| 17 | const base::Feature kExtraCookieValidityChecks{ | ||
| 18 | "ExtraCookieValidityChecks", base::FEATURE_ENABLED_BY_DEFAULT}; | ||
| 19 | |||
| 20 | +const base::Feature kSetIpv6ProbeFalse{"SetIpv6ProbeFalse", base::FEATURE_DISABLED_BY_DEFAULT}; | ||
| 21 | + | ||
| 22 | } // namespace features | ||
| 23 | } // namespace net | ||
| 24 | --- net/base/features.h.orig | ||
| 25 | +++ net/base/features.h | ||
| 26 | @@ -396,6 +396,8 @@ NET_EXPORT extern const base::Feature kP | ||
| 27 | // feature flag, assuming no breakage occurs with it enabled. | ||
| 28 | NET_EXPORT extern const base::Feature kExtraCookieValidityChecks; | ||
| 29 | |||
| 30 | +NET_EXPORT extern const base::Feature kSetIpv6ProbeFalse; | ||
| 31 | + | ||
| 32 | } // namespace features | ||
| 33 | } // namespace net | ||
| 34 | |||
| 35 | --- net/dns/host_resolver_manager.cc.orig | ||
| 36 | +++ net/dns/host_resolver_manager.cc | ||
| 37 | @@ -139,11 +139,6 @@ const unsigned kMinimumTTLSeconds = kCac | ||
| 38 | // cached. | ||
| 39 | const int kIPv6ProbePeriodMs = 1000; | ||
| 40 | |||
| 41 | -// RIPE NCC k.root-servers.net. 2001:7fd::1 (anycasted), used for IPv6 probes. | ||
| 42 | -const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x07, 0xfd, 0x00, 0x00, | ||
| 43 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 44 | - 0x00, 0x00, 0x00, 0x01}; | ||
| 45 | - | ||
| 46 | enum DnsResolveStatus { | ||
| 47 | RESOLVE_STATUS_DNS_SUCCESS = 0, | ||
| 48 | RESOLVE_STATUS_PROC_SUCCESS, | ||
| 49 | @@ -3696,7 +3691,7 @@ bool HostResolverManager::IsIPv6Reachabl | ||
| 50 | (tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() > | ||
| 51 | kIPv6ProbePeriodMs) { | ||
| 52 | SetLastIPv6ProbeResult( | ||
| 53 | - IsGloballyReachable(IPAddress(kIPv6ProbeAddress), net_log)); | ||
| 54 | + !base::FeatureList::IsEnabled(features::kSetIpv6ProbeFalse)); | ||
| 55 | cached = false; | ||
| 56 | } | ||
| 57 | net_log.AddEvent( | ||
