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

2018-08-15 Thread Andrew Oates via Qemu-devel
On Wed, Aug 15, 2018 at 7:03 AM Samuel Thibault wrote: > Andrew Oates, le mar. 14 août 2018 22:35:21 -0400, a ecrit: > > 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 heade

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

2018-08-15 Thread Samuel Thibault
Andrew Oates, le mar. 14 août 2018 22:35:21 -0400, a ecrit: > 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 r

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

2018-08-15 Thread Peter Maydell
On 15 August 2018 at 03:35, Andrew Oates 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 pack

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

2018-08-15 Thread Samuel Thibault
Andrew Oates, le mar. 14 août 2018 22:35:21 -0400, a ecrit: > 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 r

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

2018-08-14 Thread Andrew Oates via Qemu-devel
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 IC