From 9fc42dfdc179691ac229ea81b5a20984d8c0ef85 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 21 Aug 2005 23:08:30 +0000 Subject: [PATCH] * resolv/res_send.c (send_vc): Pass correct sockaddr size to connect. --- ChangeLog | 4 ++++ resolv/res_send.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 48c7dd6..de698d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-08-21 Ulrich Drepper + + * resolv/res_send.c (send_vc): Pass correct sockaddr size to connect. + 2005-08-19 H.J. Lu * sysdeps/ia64/fpu/libm_error.c (__libm_error_support): Don't abort. diff --git a/resolv/res_send.c b/resolv/res_send.c index 6f12b88..86c4f1e 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); -- 2.7.4