]> Git Repo - qemu.git/commit
slirp: fix ICMP handling on macOS hosts
authorAndrew Oates <[email protected]>
Thu, 16 Aug 2018 00:18:45 +0000 (20:18 -0400)
committerSamuel Thibault <[email protected]>
Sun, 7 Oct 2018 17:40:30 +0000 (19:40 +0200)
commit3d090aefe29846f8606d06bf55526ebb91f4d725
tree92d43314224712415455cd7c3fa56b7a202fd83b
parent632dd719b385016eb62273f12fe51512453624c1
slirp: fix ICMP handling on macOS hosts

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 <[email protected]>
Signed-off-by: Samuel Thibault <[email protected]>
slirp/ip_icmp.c
This page took 0.025139 seconds and 4 git commands to generate.