mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-12-01 14:18:36 +00:00
Fix GSO frames with more segments than a TUN read batch
This commit is contained in:
@@ -347,7 +347,7 @@ func (b *backendLinux) batchReadLoop() {
|
||||
if !tun.IsRecoverableReadError(err) {
|
||||
return
|
||||
}
|
||||
readRetry.Wait(err)
|
||||
readRetry.Wait()
|
||||
} else {
|
||||
readRetry.Reset()
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user