mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
1279. [bug] libbind: get_salen() IPv6 support was broken for OSs
w/o sa_len.
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
1279. [bug] libbind: get_salen() IPv6 support was broken for OSs
|
||||||
|
w/o sa_len.
|
||||||
|
|
||||||
1278. [bug] libbind: res_nametotype() and res_nametoclass() were
|
1278. [bug] libbind: res_nametotype() and res_nametoclass() were
|
||||||
broken.
|
broken.
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
|
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
|
||||||
static const char rcsid[] = "$Id: res_send.c,v 1.5 2001/07/03 06:49:55 marka Exp $";
|
static const char rcsid[] = "$Id: res_send.c,v 1.6 2002/05/03 06:13:27 marka Exp $";
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -521,17 +521,17 @@ get_salen(sa)
|
|||||||
{
|
{
|
||||||
|
|
||||||
#ifdef HAVE_SA_LEN
|
#ifdef HAVE_SA_LEN
|
||||||
/* there are people do not set sa_len. be forgibing to them */
|
/* There are people do not set sa_len. Be forgiving to them. */
|
||||||
if (sa->sa_len)
|
if (sa->sa_len)
|
||||||
return sa->sa_len;
|
return (sa->sa_len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (sa->sa_family == AF_INET)
|
if (sa->sa_family == AF_INET)
|
||||||
return sizeof(struct sockaddr_in);
|
return (sizeof(struct sockaddr_in));
|
||||||
else if (sa->sa_family == AF_INET)
|
else if (sa->sa_family == AF_INET6)
|
||||||
return sizeof(struct sockaddr_in6);
|
return (sizeof(struct sockaddr_in6));
|
||||||
else
|
else
|
||||||
return 0; /* unknown, die on connect */
|
return (0); /* unknown, die on connect */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user