Add logging for symmetric reply send path

This commit is contained in:
NeoMody
2026-04-03 08:30:50 +08:00
parent 1fb987cd40
commit 969212e0f8
2 changed files with 6 additions and 0 deletions

View File

@@ -286,6 +286,12 @@ func (b *MagicBind) Send(bufs [][]byte, ep conn.Endpoint) error {
dm := b.disco
b.mu.Unlock()
if dm != nil {
wgType := byte(0)
if len(bufs) > 0 && len(bufs[0]) >= 4 {
wgType = bufs[0][0]
}
b.logf("magicbind: send WG type=%d via symmetric reply to %s (peer %s)",
wgType, me.lastRecv, me.dstKey.ShortString())
for _, buf := range bufs {
dm.SendUDP(me.lastRecv, buf)
}

BIN
tailnet.test Executable file

Binary file not shown.