diff options
author | Andrew Oates <aoates@google.com> | 2018-08-15 20:18:45 -0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-10-07 19:40:30 +0200 |
commit | 3d090aefe29846f8606d06bf55526ebb91f4d725 (patch) | |
tree | 92d43314224712415455cd7c3fa56b7a202fd83b /slirp/ip_icmp.h | |
parent | 632dd719b385016eb62273f12fe51512453624c1 (diff) |
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 <aoates@google.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/ip_icmp.h')
0 files changed, 0 insertions, 0 deletions