summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-01-05 04:50:49 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-01-05 04:50:49 +0000
commit396b94f1135fe3ebf58ed67ecd87c77351371925 (patch)
tree17314a534d2c74c65cc28df82fc7fae77ebab071
parent3c136ab9a03a5e1a2d64636cacfb5cdb24ad54d6 (diff)
allow reverse lookup for v4 loopbacknet (127.0.0.0/8).
-rw-r--r--lib/libc/net/getnameinfo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c
index 787beec9c6c..000ce855238 100644
--- a/lib/libc/net/getnameinfo.c
+++ b/lib/libc/net/getnameinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getnameinfo.c,v 1.5 1999/12/30 08:54:20 itojun Exp $ */
+/* $OpenBSD: getnameinfo.c,v 1.6 2000/01/05 04:50:48 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -180,7 +180,11 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
flags |= NI_NUMERICHOST;
v4a >>= IN_CLASSA_NSHIFT;
+#if 0
if (v4a == 0 || v4a == IN_LOOPBACKNET)
+#else
+ if (v4a == 0)
+#endif
flags |= NI_NUMERICHOST;
break;
#ifdef INET6