diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-04-28 18:53:08 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-04-28 18:12:08 +0100 |
commit | 7105c50e90ed17940c5bc20d016c6cfaf2d37a6d (patch) | |
tree | 648e1f07b7991a1b1a27cf6beed9a56022b8a896 /socket.c | |
parent | 32e771c31225ba6183cf7efb70b8d876dd7589b1 (diff) | |
download | slirp-7105c50e90ed17940c5bc20d016c6cfaf2d37a6d.zip slirp-7105c50e90ed17940c5bc20d016c6cfaf2d37a6d.tar.gz slirp-7105c50e90ed17940c5bc20d016c6cfaf2d37a6d.tar.bz2 |
slirp: fix guest network access with darwin hostv2.6.0-rc5v2.6.0-rc4v2.6.0
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>
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -635,7 +635,7 @@ int sosendto(struct socket *so, struct mbuf *m) /* Don't care what port we get */ ret = sendto(so->s, m->m_data, m->m_len, 0, (struct sockaddr *)&addr, - sizeof(addr)); + sockaddr_size(&addr)); if (ret < 0) return -1; |