mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-08-30 13:21:49 +00:00
usbip: cap iso packet count at linux USBIP_MAX_ISO_PACKETS
The accepted limit of 4096 was looser than Linux's hard cap of 1024 in drivers/usb/usbip/usbip_common.h, so a real peer would reject submits we considered valid. Tighten the validator to 1024 to match upstream before multi-packet iso lands.
This commit is contained in:
parent
e0ad90bcd9
commit
a53abedcfa
1 changed files with 5 additions and 4 deletions
|
|
@ -22,10 +22,11 @@ const (
|
|||
unlinkBodySize = 28
|
||||
isoPacketDescriptorWireSize = 16
|
||||
maxUSBIPTransferBufferLength = 16 << 20
|
||||
maxUSBIPIsoPackets = 4096
|
||||
nonIsoPacketCount = -1
|
||||
usbipTransferFlagIsoASAP = 0x0002
|
||||
usbipStatusECONNRESET = -104
|
||||
// matches Linux drivers/usb/usbip/usbip_common.h USBIP_MAX_ISO_PACKETS
|
||||
maxUSBIPIsoPackets = 1024
|
||||
nonIsoPacketCount = -1
|
||||
usbipTransferFlagIsoASAP = 0x0002
|
||||
usbipStatusECONNRESET = -104
|
||||
)
|
||||
|
||||
type DataHeader struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue