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

2018-07-28 Thread Andrew Oates via Qemu-devel
On Sat, Jul 28, 2018, 13:53 Samuel Thibault wrote: > Hello, > > aoa...@google.com, le mer. 25 juil. 2018 21:08:12 -0400, a ecrit: > > 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

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

2018-07-28 Thread Samuel Thibault
Hello, aoa...@google.com, le mer. 25 juil. 2018 21:08:12 -0400, a ecrit: > 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 chang

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

2018-07-25 Thread aoates--- via Qemu-devel
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