derp: fix fmt verb for nodekeys

It was hex-ifying the String() form of key.NodePublic, which was already hex.
I noticed in some logs:

    "client 6e6f64656b65793a353537353..."

And thought that 6x6x6x6x looked strange. It's "nodekey:" in hex.

Updates tailscale/corp#20844

Change-Id: Ib9f2d63b37e324420b86efaa680668a9b807e465
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/12540/head
Brad Fitzpatrick 5 months ago committed by Brad Fitzpatrick
parent 21460a5b14
commit 4b39b6f7ce

@ -725,7 +725,7 @@ func (s *Server) accept(ctx context.Context, nc Conn, brw *bufio.ReadWriter, rem
clientAP, _ := netip.ParseAddrPort(remoteAddr) clientAP, _ := netip.ParseAddrPort(remoteAddr)
if err := s.verifyClient(ctx, clientKey, clientInfo, clientAP.Addr()); err != nil { if err := s.verifyClient(ctx, clientKey, clientInfo, clientAP.Addr()); err != nil {
return fmt.Errorf("client %x rejected: %v", clientKey, err) return fmt.Errorf("client %v rejected: %v", clientKey, err)
} }
// At this point we trust the client so we don't time out. // At this point we trust the client so we don't time out.
@ -939,7 +939,7 @@ func (c *sclient) handleFrameForwardPacket(ft frameType, fl uint32) error {
srcKey, dstKey, contents, err := s.recvForwardPacket(c.br, fl) srcKey, dstKey, contents, err := s.recvForwardPacket(c.br, fl)
if err != nil { if err != nil {
return fmt.Errorf("client %x: recvForwardPacket: %v", c.key, err) return fmt.Errorf("client %v: recvForwardPacket: %v", c.key, err)
} }
s.packetsForwardedIn.Add(1) s.packetsForwardedIn.Add(1)
@ -994,7 +994,7 @@ func (c *sclient) handleFrameSendPacket(ft frameType, fl uint32) error {
dstKey, contents, err := s.recvPacket(c.br, fl) dstKey, contents, err := s.recvPacket(c.br, fl)
if err != nil { if err != nil {
return fmt.Errorf("client %x: recvPacket: %v", c.key, err) return fmt.Errorf("client %v: recvPacket: %v", c.key, err)
} }
var fwd PacketForwarder var fwd PacketForwarder

Loading…
Cancel
Save