Commit fa5a42fb authored by Brian Wellington's avatar Brian Wellington
Browse files

670. [bug] The lwres replacements for getaddrinfo and

                        getipnodebyname didn't properly check for the
                        existence of the sockaddr sa_len field.
parent 523dd6a9
670. [bug] The lwres replacements for getaddrinfo and
getipnodebyname didn't properly check for the
existence of the sockaddr sa_len field.
669. [func] dnssec-keygen now makes the public key file
non-world-readable for symmetric keys. [RT #403]
......
......@@ -19,7 +19,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getaddrinfo.c,v 1.34 2000/12/06 00:35:44 tale Exp $ */
/* $Id: getaddrinfo.c,v 1.35 2001/01/09 01:26:42 bwelling Exp $ */
#include <config.h>
......@@ -618,7 +618,7 @@ get_local(const char *name, int socktype, struct addrinfo **res) {
* ai_family
* ai_addr
* ai_addr->sa_family
* ai_addr->sa_len (HAVE_SA_LEN)
* ai_addr->sa_len (LWRES_PLATFORM_HAVESALEN)
* and everything else is initialized to zero.
*/
static struct addrinfo *
......@@ -637,7 +637,7 @@ ai_alloc(int family, int addrlen) {
ai->ai_addrlen = addrlen;
ai->ai_family = family;
ai->ai_addr->sa_family = family;
#ifdef HAVE_SA_LEN
#ifdef LWRES_PLATFORM_HAVESALEN
ai->ai_addr->sa_len = addrlen;
#endif
return (ai);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getipnode.c,v 1.26 2000/10/05 22:27:51 bwelling Exp $ */
/* $Id: getipnode.c,v 1.27 2001/01/09 01:26:43 bwelling Exp $ */
#include <config.h>
......@@ -455,7 +455,7 @@ scan_interfaces(int *have_v4, int *have_v6) {
(*have_v4 == 0 || *have_v6 == 0) && cp < cplim;
cp += cpsize) {
memcpy(&ifreq, cp, sizeof ifreq);
#ifdef HAVE_SA_LEN
#ifdef LWRES_PLATFORM_HAVESALEN
#ifdef FIX_ZERO_SA_LEN
if (ifreq.ifr_addr.sa_len == 0)
ifreq.ifr_addr.sa_len = IN6ADDRSZ;
......@@ -475,7 +475,7 @@ scan_interfaces(int *have_v4, int *have_v6) {
/* XXX maybe this should be a hard error? */
if (ioctl(s, SIOCGIFADDR, (char *)&ifreq) < 0)
continue;
#endif /* HAVE_SA_LEN */
#endif /* LWRES_PLATFORM_HAVESALEN */
switch (ifreq.ifr_addr.sa_family) {
case AF_INET:
if (*have_v4 == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment