mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-01 09:32:08 +00:00
net/interfaces/windows: update Tailscale interface detection logic to
account for new wintun naming. Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -116,8 +116,12 @@ func notTailscaleInterface(iface *winipcfg.IPAdapterAddresses) bool {
|
|||||||
// TODO(bradfitz): do this without the Description method's
|
// TODO(bradfitz): do this without the Description method's
|
||||||
// utf16-to-string allocation. But at least we only do it for
|
// utf16-to-string allocation. But at least we only do it for
|
||||||
// the virtual interfaces, for which there won't be many.
|
// the virtual interfaces, for which there won't be many.
|
||||||
return !(iface.IfType == winipcfg.IfTypePropVirtual &&
|
if iface.IfType != winipcfg.IfTypePropVirtual {
|
||||||
iface.Description() == tsconst.WintunInterfaceDesc)
|
return true
|
||||||
|
}
|
||||||
|
desc := iface.Description()
|
||||||
|
return !(strings.Contains(desc, tsconst.WintunInterfaceDesc) ||
|
||||||
|
strings.Contains(desc, tsconst.WintunInterfaceDesc0_14))
|
||||||
}
|
}
|
||||||
|
|
||||||
// NonTailscaleInterfaces returns a map of interface LUID to interface
|
// NonTailscaleInterfaces returns a map of interface LUID to interface
|
||||||
|
|||||||
@@ -7,5 +7,6 @@
|
|||||||
package tsconst
|
package tsconst
|
||||||
|
|
||||||
// WintunInterfaceDesc is the description attached to Tailscale
|
// WintunInterfaceDesc is the description attached to Tailscale
|
||||||
// interfaces on Windows. This is set by our modified WinTun driver.
|
// interfaces on Windows. This is set by the WinTun driver.
|
||||||
const WintunInterfaceDesc = "Tailscale Tunnel"
|
const WintunInterfaceDesc = "Tailscale Tunnel"
|
||||||
|
const WintunInterfaceDesc0_14 = "Wintun Userspace Tunnel"
|
||||||
|
|||||||
Reference in New Issue
Block a user