summaryrefslogtreecommitdiffstats
path: root/src/usb.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2026-11-25 08:33:25 +0100
committerGravatar Nikias Bassen2026-11-25 08:33:25 +0100
commit9d230fd89ea8d18e2437d3a3efd54bfcd16f77b0 (patch)
tree61215be7c2fea2848cebef77310b0dc584064c63 /src/usb.c
parentf4d2e5fad43152f1ac1bdb804dfbd1cef5f0815b (diff)
downloadusbmuxd-9d230fd89ea8d18e2437d3a3efd54bfcd16f77b0.tar.gz
usbmuxd-9d230fd89ea8d18e2437d3a3efd54bfcd16f77b0.tar.bz2
usb: Require all three usbmux interface fields to match
a2cbb59 inverted the interface check incorrectly: the original "!= class || != subclass || != protocol -> skip" became "== class || == subclass || == protocol -> usbmux interface", so any vendor-class (255) interface matched. On the internal T1 (05ac:8600) this picked interface 7 (ff/f9/11) and tried to claim it.
Diffstat (limited to 'src/usb.c')
-rw-r--r--src/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usb.c b/src/usb.c
index 0babd03..baecb90 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -542,8 +542,8 @@ static int set_valid_configuration(struct libusb_device* dev, struct usb_device
}
for(k = 0 ; k < config->bNumInterfaces ; k++) {
intf = &config->interface[k].altsetting[0];
- if(intf->bInterfaceClass == INTERFACE_CLASS ||
- intf->bInterfaceSubClass == INTERFACE_SUBCLASS ||
+ if(intf->bInterfaceClass == INTERFACE_CLASS &&
+ intf->bInterfaceSubClass == INTERFACE_SUBCLASS &&
intf->bInterfaceProtocol == INTERFACE_PROTOCOL) {
usbmuxd_log(LL_NOTICE, "Found usbmux interface for device %i-%i: %i", bus, address, intf->bInterfaceNumber);
if(intf->bNumEndpoints != 2) {