mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
Fix UDP DNS queries in addns
The addns code tries to use common approach for TCP and UDP queries, calling connect() for both types of sockets. In case of UDP that requires to use send() instead of sendto(). Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 13 03:51:04 CEST 2018 on sn-devel-144
This commit is contained in:
parent
454edac226
commit
83cd68c8ae
@ -221,9 +221,7 @@ static DNS_ERROR dns_send_udp(struct dns_connection *conn,
|
||||
ssize_t ret;
|
||||
|
||||
do {
|
||||
ret = sendto(conn->s, buf->data, buf->offset, 0,
|
||||
(struct sockaddr *)&conn->RecvAddr,
|
||||
sizeof(conn->RecvAddr));
|
||||
ret = send(conn->s, buf->data, buf->offset, 0);
|
||||
} while ((ret == -1) && (errno == EINTR));
|
||||
|
||||
if (ret != buf->offset) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user