Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-08-14 Thread Peter Maydell
On 12 August 2018 at 04:11, Andrew Oates wrote: > Ping --- would you like me to resubmit the patch using CONFIG_BSD? Yes, that seems our best option. Could you please also include a comment that summarises the behaviour of the other host OSes and why we're using this ifdef? thanks -- PMM

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-08-14 Thread Andrew Oates via Qemu-devel
On Tue, Aug 14, 2018 at 11:52 AM Peter Maydell wrote: > On 12 August 2018 at 04:11, Andrew Oates wrote: > > Ping --- would you like me to resubmit the patch using CONFIG_BSD? > > Yes, that seems our best option. Could you please also include > a comment that summarises the behaviour of the other

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-08-11 Thread Andrew Oates via Qemu-devel
Ping --- would you like me to resubmit the patch using CONFIG_BSD? Cheers, ~Andrew On Wed, Aug 1, 2018 at 10:39 AM Andrew Oates wrote: > > > > On Wed, Aug 1, 2018 at 6:10 AM Peter Maydell > wrote: > >> On 1 August 2018 at 00:25, Andrew Oates wrote: >> > Both CONFIG_BSD and not-CONFIG_LINUX w

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-08-01 Thread Andrew Oates via Qemu-devel
On Wed, Aug 1, 2018 at 6:10 AM Peter Maydell wrote: > On 1 August 2018 at 00:25, Andrew Oates wrote: > > Both CONFIG_BSD and not-CONFIG_LINUX work on macOS. I unfortunately > don't > > have access to any other BSDs to test them, though. > > Is there an easy way to test it? The QEMU makefiles ha

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-08-01 Thread Peter Maydell
On 1 August 2018 at 00:25, Andrew Oates wrote: > Both CONFIG_BSD and not-CONFIG_LINUX work on macOS. I unfortunately don't > have access to any other BSDs to test them, though. Is there an easy way to test it? The QEMU makefiles have some runes for setting up a BSD VM... thanks -- PMM

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-07-31 Thread Andrew Oates via Qemu-devel
On Tue, Jul 31, 2018 at 6:22 AM Peter Maydell wrote: > On 31 July 2018 at 02:16, Andrew Oates wrote: > > Yeah, I suspect (but haven't tested) that this applies to all BSDs. We > > could switch CONFIG_DARWIN to CONFIG_BSD (happy to resend the patch, just > > LMK). > > > > Agreed that platform-sp

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-07-31 Thread Peter Maydell
On 31 July 2018 at 02:16, Andrew Oates wrote: > Yeah, I suspect (but haven't tested) that this applies to all BSDs. We > could switch CONFIG_DARWIN to CONFIG_BSD (happy to resend the patch, just > LMK). > > Agreed that platform-specific ifdefs are gross, but I don't see a better way > here :/ On

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-07-30 Thread Andrew Oates via Qemu-devel
Yeah, I suspect (but haven't tested) that this applies to all BSDs. We could switch CONFIG_DARWIN to CONFIG_BSD (happy to resend the patch, just LMK). Agreed that platform-specific ifdefs are gross, but I don't see a better way here :/ One option would be to look at the packet length and content

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-07-30 Thread Peter Maydell
On 29 July 2018 at 15:35, Samuel Thibault wrote: > From: Andrew Oates > > On Linux, SOCK_DGRAM+IPPROTO_ICMP sockets give only the ICMP packet when > read from. On macOS, however, the socket acts like a SOCK_RAW socket > and includes the IP header as well. > > This change strips the extra IP head

[Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-07-29 Thread Samuel Thibault
From: Andrew Oates On Linux, SOCK_DGRAM+IPPROTO_ICMP sockets give only the ICMP packet when read from. On macOS, however, the socket acts like a SOCK_RAW socket and includes the IP header as well. This change strips the extra IP header from the received packet on macOS before sending it to the