Slirp Broadcast traffic

Bug #1838228 reported by Chris Koch on 2019-07-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Hi all,

Version: QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-7+build1)

I'm running some DHCP traffic to a *custom* DHCP server with user-mode networking in QEMU. I'm using port 30067 for the server, so this does not conflict with the built-in DHCP server.

DHCP broadcasts to and from the server, and I'm observing issues with both sending and receiving packets.

Firstly, from the VM, a packet sent to IPv4 x.x.x.2:30067 (gateway) makes it to the server, but a packet sent to does not. I'd suspect that Slirp has to support sending to the broadcast IP address? Or is this something I can turn on with a configuration option? (My QEMU version too old?)

Secondly, the source address in a DHCP IPv4 packet must be (by RFC). That means that any return packet will have swapped in as its destination address. However, that packet doesn't make it into the VM at all. I know that if you deliver this packet to Linux, a raw socket will spit it back out. The packets' destination address should not prevent the packet from being delivered to the right VM, since Slirp (should?) know exactly which VM the session belongs to. (It's a proxy, not a router.)

WDYT? Did I miss some configuration options or use too old a version?


elmarco (marcandre-lureau) wrote :

slirp has been moved to a standalone project, can you report here:

I don't have an answer off the top of my head, but I would suggest looking/tweaking at the network mask. And for the receive side, debugging from sorecvfrom().

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.