diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-02-17 08:45:58 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-02-17 14:45:34 +0100 |
commit | 6637b2f4b06fcee1e8e1b1782dd96e3273f8caac (patch) | |
tree | e7e317e5cb575bc68eb5553b1823e7313f7cddf6 | |
parent | 135543b4c300e2fc31ee4165ce630644e1aef455 (diff) | |
download | samba-6637b2f4b06fcee1e8e1b1782dd96e3273f8caac.tar.gz |
tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connect_send()
This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX
sockets. Also some platforms require exact values for AF_INET and AF_INET6.
metze
-rw-r--r-- | lib/tsocket/tsocket_bsd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index 5cd7702ff6b..8d1fe320834 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -2025,7 +2025,7 @@ static struct tevent_req * tstream_bsd_connect_send(TALLOC_CTX *mem_ctx, } if (do_bind) { - ret = bind(state->fd, &lbsda->u.sa, sizeof(lbsda->u.ss)); + ret = bind(state->fd, &lbsda->u.sa, sa_socklen); if (ret == -1) { tevent_req_error(req, errno); goto post; |