From: Ken Raeburn Date: Thu, 19 Jul 2001 11:36:05 +0000 (+0000) Subject: prefer inet_addr over inet_aton X-Git-Tag: krb5-1.3-alpha1~1198 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=930f7edd0c8ebc31b4cad96a89c392584ab7f2ea;p=krb5.git prefer inet_addr over inet_aton git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13612 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h index 48d945574..a543f98d2 100644 --- a/src/include/fake-addrinfo.h +++ b/src/include/fake-addrinfo.h @@ -220,9 +220,16 @@ int getaddrinfo (const char *name, const char *serv, If it's not set, don't accept such names. */ if (flags & AI_NUMERICHOST) { struct in_addr addr4; +#if 0 ret = inet_aton (name, &addr4); if (ret) return EAI_NONAME; +#else + addr4.s_addr = inet_addr (name); + if (addr4.s_addr == 0xffffffff || addr4.s_addr == -1) + /* 255.255.255.255 or parse error, both bad */ + return EAI_NONAME; +#endif ret = fai_add_entry (&res, &addr4, port, &template); } else { ret = fai_add_hosts_by_name (name, AF_INET, &template, port, flags,