wgengine/netstack: use types/logger.Logf instead of stdlib log.Printf (#13267)

Updates #cleanup

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited 2024-08-26 16:16:06 -07:00 committed by GitHub
parent f99f970dc1
commit 6d4973e1e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,6 @@ import (
"expvar" "expvar"
"fmt" "fmt"
"io" "io"
"log"
"math" "math"
"net" "net"
"net/netip" "net/netip"
@ -849,12 +848,12 @@ func (ns *Impl) inject() {
// ownership of one count and will decrement on completion. // ownership of one count and will decrement on completion.
if sendToHost { if sendToHost {
if err := ns.tundev.InjectInboundPacketBuffer(pkt); err != nil { if err := ns.tundev.InjectInboundPacketBuffer(pkt); err != nil {
log.Printf("netstack inject inbound: %v", err) ns.logf("netstack inject inbound: %v", err)
return return
} }
} else { } else {
if err := ns.tundev.InjectOutboundPacketBuffer(pkt); err != nil { if err := ns.tundev.InjectOutboundPacketBuffer(pkt); err != nil {
log.Printf("netstack inject outbound: %v", err) ns.logf("netstack inject outbound: %v", err)
return return
} }
} }