* resolv/res_send.c (send_vc): Pass correct sockaddr size to connect.

This commit is contained in:
Ulrich Drepper 2005-08-21 23:08:30 +00:00
parent d6c7294ed6
commit 9fc42dfdc1
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-08-21 Ulrich Drepper <drepper@redhat.com>
* resolv/res_send.c (send_vc): Pass correct sockaddr size to connect.
2005-08-19 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/ia64/fpu/libm_error.c (__libm_error_support): Don't abort.

View File

@ -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);