This commit is contained in:
bluepython508 committed 2026-10-22 12:27:19 +01:00
1 parent 3530afb854
commit 6903fcff27
2146 files changed
+112256 -190703

No files matched your search

+7 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) Tailscale Inc & AUTHORS
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
//go:build ts_macext && (darwin || ios)
@@ -6,6 +6,7 @@
package ipnlocal
import (
"fmt"
"net"
"net/netip"
@@ -20,5 +21,10 @@ func init() {
// through the iOS/macOS Network/System Extension (Packet Tunnel
// Provider) sandbox.
func initListenConfigNetworkExtension(nc *net.ListenConfig, ip netip.Addr, ifaceIndex int) error {
// A zero ifaceIndex is invalid for peerapi. A zero value will not get us
// out of the network sandbox. Caller should log and retry.
if ifaceIndex == 0 {
return fmt.Errorf("peerapi: cannot listen on %s with ifaceIndex 0", ip)
}
return netns.SetListenConfigInterfaceIndex(nc, ifaceIndex)
}