mirror of
https://github.com/tailscale/tailscale.git
synced 2026-05-11 07:06:24 +02:00
net/netns: add logs to getInterfaceIndex too
Change-Id: Ia0f5f188633eaac2d396d1cebe322b3aa0ceb484
This commit is contained in:
parent
9bc611b129
commit
a6739e7988
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user