cmd/natc: expose netstack metrics in client metrics in natc

Updates tailscale/corp#25169

Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
James Tucker 2025-01-23 16:31:40 -08:00 committed by James Tucker
parent 2089f4b603
commit 82e41ddc42

View File

@ -10,6 +10,7 @@ import (
"context" "context"
"encoding/binary" "encoding/binary"
"errors" "errors"
"expvar"
"flag" "flag"
"fmt" "fmt"
"log" "log"
@ -159,6 +160,9 @@ func main() {
if err := ns.SetTransportProtocolOption(tcp.ProtocolNumber, &mslOpt); err != nil { if err := ns.SetTransportProtocolOption(tcp.ProtocolNumber, &mslOpt); err != nil {
log.Fatalf("could not set TCP MSL: %v", err) log.Fatalf("could not set TCP MSL: %v", err)
} }
if *debugPort != 0 {
expvar.Publish("netstack", ns.ExpVar())
}
lc, err := ts.LocalClient() lc, err := ts.LocalClient()
if err != nil { if err != nil {