slirp: fix guest network access with darwin host
commit0d48dfedc5c2beb418ad4c08b78de14e794bb199
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 28 Apr 2016 16:53:08 +0000 (28 18:53 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 28 Apr 2016 17:12:08 +0000 (28 18:12 +0100)
treebd061e316c485320611cf0d3f1c2f34e1a302bce
parent8c4bf97580a7556e3e61b7bc41dedb5958f0b2f9
slirp: fix guest network access with darwin host

On Darwin, connect, sendto and friends want the exact size of the sockaddr,
not more (and in particular, not sizeof(struct sockaddr_storaget))

This commit adds the sockaddr_size helper to be used when passing a sockaddr
size to such function, and makes use of it int sendto and connect calls.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
slirp/ip_icmp.c
slirp/socket.c
slirp/socket.h
slirp/tcp_subr.c