summaryrefslogtreecommitdiffstats
path: root/src/include/fake-addrinfo.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2001-07-19 11:36:05 +0000
committerKen Raeburn <raeburn@mit.edu>2001-07-19 11:36:05 +0000
commit930f7edd0c8ebc31b4cad96a89c392584ab7f2ea (patch)
treecad72ff8affde7adc4d27d224a707618eecb70f8 /src/include/fake-addrinfo.h
parent4f6736ca3c6fcc5a2a04d2ee75d902710ab9422b (diff)
downloadkrb5-930f7edd0c8ebc31b4cad96a89c392584ab7f2ea.tar.gz
krb5-930f7edd0c8ebc31b4cad96a89c392584ab7f2ea.tar.xz
krb5-930f7edd0c8ebc31b4cad96a89c392584ab7f2ea.zip
prefer inet_addr over inet_aton
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13612 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/fake-addrinfo.h')
-rw-r--r--src/include/fake-addrinfo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h
index 48d9455746..a543f98d23 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,