usbnet: Accept mandatory USB_CDC_SET_ETHERNET_PACKET_FILTER request
authorMichael Brown <mcb30@ipxe.org>
Tue, 6 Sep 2022 18:30:51 +0000 (19:30 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 27 Sep 2022 05:32:30 +0000 (07:32 +0200)
The USB_CDC_SET_ETHERNET_PACKET_FILTER request is mandatory for
CDC-ECM devices.  Accept this request, ignoring the actual filter
value (to match the existing behaviour for RNDIS).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Message-Id: <20220906183053.3625472-3-mcb30@ipxe.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-network.c

index 61bf598870cb57853177ddac3a5b2e16eb6d9a34..155df935cd6806cd685769fdece5c083bb7c48bf 100644 (file)
@@ -1122,6 +1122,12 @@ static void usb_net_handle_control(USBDevice *dev, USBPacket *p,
 #endif
         break;
 
+    case ClassInterfaceOutRequest | USB_CDC_SET_ETHERNET_PACKET_FILTER:
+        if (is_rndis(s)) {
+            goto fail;
+        }
+        break;
+
     default:
     fail:
         fprintf(stderr, "usbnet: failed control transaction: "