Fix GSO frames with more segments than a TUN read batch

This commit is contained in:
世界
2026-11-09 15:02:49 +00:00
parent 44e700375e
commit 0b83b66c47
5 changed files with 4 additions and 11 deletions
+1 -1
View File
@@ -347,7 +347,7 @@ func (b *backendLinux) batchReadLoop() {
if !tun.IsRecoverableReadError(err) {
return
}
readRetry.Wait(err)
readRetry.Wait()
} else {
readRetry.Reset()
}
-4
View File
@@ -4,7 +4,6 @@ package tailscale
import (
"encoding/hex"
"errors"
"io"
"os"
"sync"
@@ -75,9 +74,6 @@ func (a *tunDeviceAdapter) Read(bufs [][]byte, sizes []int, offset int) (count i
a.debugPacket("read", readBuf[singTun.PacketOffset:n])
return 1, nil
}
if errors.Is(err, singTun.ErrTooManySegments) {
err = wgTun.ErrTooManySegments
}
return 0, err
}