wgengine/magicsock: fix stats packet counter on derp egress

Updates tailscale/corp#22075

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov 2024-10-29 13:40:33 +00:00 committed by Anton Tolchanov
parent 94fa6d97c5
commit 11e96760ff

View File

@ -991,7 +991,7 @@ func (de *endpoint) send(buffs [][]byte) error {
}
if stats := de.c.stats.Load(); stats != nil {
stats.UpdateTxPhysical(de.nodeAddr, derpAddr, 1, txBytes)
stats.UpdateTxPhysical(de.nodeAddr, derpAddr, len(buffs), txBytes)
}
if allOk {
return nil