net/netns: fix controlLogf doc

Its doc said its signature matched a std signature, but it used
Tailscale-specific types.

Nowadays it's the caller (func control) that curries the logf/netmon
and returns the std-matching signature.

Updates #cleanup (while answering a question on Slack)

Change-Id: Ic99de41fc6a1c720575a7f33c564d0bcfd9a2c30
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2025-06-23 21:24:37 -07:00
parent 4a1fc378d1
commit f8ba400c58

View File

@ -33,10 +33,8 @@ var bindToInterfaceByRouteEnv = envknob.RegisterBool("TS_BIND_TO_INTERFACE_BY_RO
var errInterfaceStateInvalid = errors.New("interface state invalid") var errInterfaceStateInvalid = errors.New("interface state invalid")
// controlLogf marks c as necessary to dial in a separate network namespace. // controlLogf binds c to a particular interface as necessary to dial the
// // provided (network, address).
// It's intentionally the same signature as net.Dialer.Control
// and net.ListenConfig.Control.
func controlLogf(logf logger.Logf, netMon *netmon.Monitor, network, address string, c syscall.RawConn) error { func controlLogf(logf logger.Logf, netMon *netmon.Monitor, network, address string, c syscall.RawConn) error {
if isLocalhost(address) { if isLocalhost(address) {
// Don't bind to an interface for localhost connections. // Don't bind to an interface for localhost connections.