mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-08-26 22:23:12 -04:00
In qemu_receive_packet() we check to see if we should pad a short packet. This is doing the wrong test: because this function is used when the device adds a packet to its own incoming queue (i.e. for loopback), we should be checking the NetClientState's own do_not_pad flag, not that for its peer. We didn't notice this earlier, because at the moment all the real peers of a network device (i.e. the network backends) do not set do_not_pad, so net_peer_needs_padding() always returns true except in the corner case where the network device has no peer at all. The effect of this is that if a network device has no peer (e.g. because QEMU was started with -net none or with -nodefaults) then we can still let through the kind of "guest misprograms the network device to loopback-transmit a short packet and then we mishandle it in the receive path" bug like #3043 which commit |
||
|---|---|---|
| .. | ||
| announce.h | ||
| can_emu.h | ||
| can_host.h | ||
| checksum.h | ||
| eth.h | ||
| filter.h | ||
| net.h | ||
| queue.h | ||
| slirp.h | ||
| tap.h | ||
| vhost-vdpa.h | ||
| vhost_net.h | ||