mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-12-01 14:18:36 +00:00
Fix WireGuard system device packet size on darwin
This commit is contained in:
@@ -135,6 +135,7 @@ func (w *systemDevice) Read(bufs [][]byte, sizes []int, offset int) (count int,
|
||||
} else {
|
||||
sizes[0], err = w.device.Read(bufs[0][offset-tun.PacketOffset:])
|
||||
if err == nil {
|
||||
sizes[0] -= tun.PacketOffset
|
||||
count = 1
|
||||
} else if errors.Is(err, tun.ErrTooManySegments) {
|
||||
err = wgTun.ErrTooManySegments
|
||||
|
||||
Reference in New Issue
Block a user