From 46849fc73c84117ee1dad6ef7ccb5b4e799c01e0 Mon Sep 17 00:00:00 2001 From: Diep Bui Date: Wed, 29 Mar 2023 10:36:50 +0000 Subject: [PATCH] Print discovered network interfaces for debugging ICE_NEVER_CONNECTED endcause. Bug: webrtc:14334 Change-Id: Iad2f25e44cd3a154d6dceda755696480e2618a93 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299421 Commit-Queue: Diep Bui Reviewed-by: Tomas Gunnarsson Cr-Commit-Position: refs/heads/main@{#39716} --- p2p/client/basic_port_allocator.cc | 4 ++++ rtc_base/network.cc | 3 +++ 2 files changed, 7 insertions(+) diff --git a/p2p/client/basic_port_allocator.cc b/p2p/client/basic_port_allocator.cc index e36f266f15..2815b93476 100644 --- a/p2p/client/basic_port_allocator.cc +++ b/p2p/client/basic_port_allocator.cc @@ -768,6 +768,10 @@ std::vector BasicPortAllocatorSession::GetNetworks() { networks.insert(networks.end(), any_address_networks.begin(), any_address_networks.end()); } + RTC_LOG(LS_INFO) << "Count of networks: " << networks.size(); + for (const rtc::Network* network : networks) { + RTC_LOG(LS_INFO) << network->ToString(); + } } // Filter out link-local networks if needed. if (flags() & PORTALLOCATOR_DISABLE_LINK_LOCAL_NETWORKS) { diff --git a/rtc_base/network.cc b/rtc_base/network.cc index bbcf690915..602ce1742d 100644 --- a/rtc_base/network.cc +++ b/rtc_base/network.cc @@ -154,16 +154,19 @@ bool IsIgnoredIPv6(bool allow_mac_based_ipv6, const InterfaceAddress& ip) { // However, our IPAddress structure doesn't carry that so the // information is lost and causes binding failure. if (IPIsLinkLocal(ip)) { + RTC_LOG(LS_INFO) << "Ignore link local IP:" << ip.ToSensitiveString(); return true; } // Any MAC based IPv6 should be avoided to prevent the MAC tracking. if (IPIsMacBased(ip) && !allow_mac_based_ipv6) { + RTC_LOG(LS_INFO) << "Ignore Mac based IP:" << ip.ToSensitiveString(); return true; } // Ignore deprecated IPv6. if (ip.ipv6_flags() & IPV6_ADDRESS_FLAG_DEPRECATED) { + RTC_LOG(LS_INFO) << "Ignore deprecated IP:" << ip.ToSensitiveString(); return true; }