mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-06 23:36:34 +09:00
Without this, we try to send probes through the Tailscale interface when an exit node is in use. The exit node is usually unreachable until the user signs in to the captive portal, so the probes get blackholed and we miss the portal. Updates #1634 Updates #17095 Updates tailscale/corp#21896 Change-Id: I124652d5a4e933089084f4317f7242c3e1470b99 Signed-off-by: Nick Khyl <nickk@tailscale.com>
20 lines
486 B
Go
20 lines
486 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !(ios || darwin || windows)
|
|
|
|
package captivedetection
|
|
|
|
import (
|
|
"syscall"
|
|
|
|
"tailscale.com/types/logger"
|
|
)
|
|
|
|
// setSocketInterfaceIndex sets the IP_BOUND_IF socket option on the given RawConn.
|
|
// This forces the socket to use the given interface.
|
|
func setSocketInterfaceIndex(syscall.RawConn, int, logger.Logf) error {
|
|
// No-op on all platforms except Darwin and Windows.
|
|
return nil
|
|
}
|