Fix WireGuard system device packet size on darwin

This commit is contained in:
世界
2026-10-23 19:57:02 +08:00
parent f2c4d678f4
commit e352ada7ab
+1
View File
@@ -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