diff --git a/net/netns/netns_darwin.go b/net/netns/netns_darwin.go index 586e2d918..3a5e499f2 100644 --- a/net/netns/netns_darwin.go +++ b/net/netns/netns_darwin.go @@ -58,7 +58,12 @@ func controlLogf(logf logger.Logf, netMon *netmon.Monitor, network, address stri return bindConnToInterface(c, network, address, idx, logf) } -func getInterfaceIndex(logf logger.Logf, netMon *netmon.Monitor, address string) (int, error) { +func getInterfaceIndex(logf logger.Logf, netMon *netmon.Monitor, address string) (retIf int, retErr error) { + logf("getInterfaceIndex(%q) called", address) + defer func() { + logf("getInterfaceIndex(%q) = (%d, %v)", address, retIf, retErr) + }() + // Helper so we can log errors. defaultIdx := func() (int, error) { if netMon == nil {