aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-network.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2022-09-06 19:30:51 +0100
committerGerd Hoffmann <kraxel@redhat.com>2022-09-27 07:32:30 +0200
commit954cbf7bb53476e99091f9c99a8014af2491f6ef (patch)
treeb88408bd6cb8e5005a6f19efa954c22a8fb46ddf /hw/usb/dev-network.c
parenta89003780d0a96b79314da4a4cdb148ff1dcb397 (diff)
downloadqemu-954cbf7bb53476e99091f9c99a8014af2491f6ef.zip
qemu-954cbf7bb53476e99091f9c99a8014af2491f6ef.tar.gz
qemu-954cbf7bb53476e99091f9c99a8014af2491f6ef.tar.bz2
usbnet: Accept mandatory USB_CDC_SET_ETHERNET_PACKET_FILTER request
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>
Diffstat (limited to 'hw/usb/dev-network.c')
-rw-r--r--hw/usb/dev-network.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
index 61bf598..155df93 100644
--- a/hw/usb/dev-network.c
+++ b/hw/usb/dev-network.c
@@ -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: "