about summary refs log tree commit diff
path: root/resolv/res_send.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-08-21 23:08:30 +0000
committerUlrich Drepper <drepper@redhat.com>2005-08-21 23:08:30 +0000
commit9fc42dfdc179691ac229ea81b5a20984d8c0ef85 (patch)
treecec800f01746145d7565070be86d2390f4970684 /resolv/res_send.c
parentd6c7294ed609cbd8597898a1c92141dde23994bc (diff)
downloadglibc-9fc42dfdc179691ac229ea81b5a20984d8c0ef85.tar.gz
glibc-9fc42dfdc179691ac229ea81b5a20984d8c0ef85.tar.xz
glibc-9fc42dfdc179691ac229ea81b5a20984d8c0ef85.zip
* resolv/res_send.c (send_vc): Pass correct sockaddr size to connect.
Diffstat (limited to 'resolv/res_send.c')
-rw-r--r--resolv/res_send.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 6f12b88d6f..86c4f1e0f7 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -654,7 +654,9 @@ send_vc(res_state statp,
 		}
 		__set_errno (0);
 		if (connect(statp->_vcsock, (struct sockaddr *)nsap,
-			    sizeof *nsap) < 0) {
+			    nsap->sin6_family == AF_INET
+			    ? sizeof (struct sockaddr_in)
+			    : sizeof (struct sockaddr_in6)) < 0) {
 			*terrno = errno;
 			Aerror(statp, stderr, "connect/vc", errno,
 			       (struct sockaddr *) nsap);