diff options
author | Andrew Oates | 2018-08-16 02:18:45 +0200 |
---|---|---|
committer | Samuel Thibault | 2018-10-07 19:40:30 +0200 |
commit | 3d090aefe29846f8606d06bf55526ebb91f4d725 (patch) | |
tree | 92d43314224712415455cd7c3fa56b7a202fd83b /hw/i2c/aspeed_i2c.c | |
parent | slirp: document mbuf pointers and sizes (diff) | |
download | qemu-3d090aefe29846f8606d06bf55526ebb91f4d725.tar.gz qemu-3d090aefe29846f8606d06bf55526ebb91f4d725.tar.xz qemu-3d090aefe29846f8606d06bf55526ebb91f4d725.zip |
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 'hw/i2c/aspeed_i2c.c')
0 files changed, 0 insertions, 0 deletions