From 310e0624aa78a0adf09fcd25626d50100e8b0414 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Mon, 21 Nov 2022 17:33:16 +0100 Subject: [PATCH] Add Cisco AnyConnect IPSec MAC to VPN detection and set the underlying type to unknown for mac-based detection. BUG=webrtc:13097,webrtc:13172 Co-authored by: amir.pirogovsky@microsoft.com Change-Id: I177214f9eb5c2990faa65262f77b3d0ce9d5eab7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284500 Reviewed-by: Harald Alvestrand Reviewed-by: Jonas Oreland Commit-Queue: Philipp Hancke Cr-Commit-Position: refs/heads/main@{#38709} --- rtc_base/network.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rtc_base/network.cc b/rtc_base/network.cc index ce79fe40ce..bbcf690915 100644 --- a/rtc_base/network.cc +++ b/rtc_base/network.cc @@ -50,9 +50,11 @@ using ::webrtc::SafeTask; using ::webrtc::TimeDelta; // List of MAC addresses of known VPN (for windows). -constexpr uint8_t kVpns[2][6] = { - // Cisco AnyConnect. +constexpr uint8_t kVpns[3][6] = { + // Cisco AnyConnect SSL VPN Client. {0x0, 0x5, 0x9A, 0x3C, 0x7A, 0x0}, + // Cisco AnyConnect IPSEC VPN Client. + {0x0, 0x5, 0x9A, 0x3C, 0x78, 0x0}, // GlobalProtect Virtual Ethernet. {0x2, 0x50, 0x41, 0x0, 0x0, 0x1}, }; @@ -864,7 +866,9 @@ bool BasicNetworkManager::CreateNetworks( reinterpret_cast( adapter_addrs->PhysicalAddress), adapter_addrs->PhysicalAddressLength))) { - underlying_type_for_vpn = adapter_type; + // With MAC-based detection we do not know the + // underlying adapter type. + underlying_type_for_vpn = ADAPTER_TYPE_UNKNOWN; adapter_type = ADAPTER_TYPE_VPN; }