qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] slirp: fix ICMP handling on macOS hosts


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3] slirp: fix ICMP handling on macOS hosts
Date: Wed, 15 Aug 2018 11:58:00 +0100

On 15 August 2018 at 03:35, Andrew Oates <address@hidden> wrote:
> 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 guest.  SOCK_DGRAM ICMP sockets aren't
> supported on other BSDs, but we enable this behavior for them as well to
> treat the sockets the same as raw sockets.
>
> Signed-off-by: Andrew Oates <address@hidden>
> ---
> v2: check validity of inner_hlen and update len appropriately
> v3: CONFIG_DARWIN -> CONFIG_BSD; add comment explaining #ifdef
>

Reviewed-by: Peter Maydell <address@hidden>

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]