diff options
Diffstat (limited to 'lib/libc/net/getnetnamadr.c')
-rw-r--r-- | lib/libc/net/getnetnamadr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c index 2f4ff3e9712..8d892a1bce4 100644 --- a/lib/libc/net/getnetnamadr.c +++ b/lib/libc/net/getnetnamadr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getnetnamadr.c,v 1.3 1997/04/03 07:31:55 downsj Exp $ */ +/* $OpenBSD: getnetnamadr.c,v 1.4 1997/04/03 08:33:06 downsj Exp $ */ /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro * Dep. Matematica Universidade de Coimbra, Portugal, Europe @@ -46,7 +46,7 @@ static char sccsid[] = "@(#)getnetbyaddr.c 8.1 (Berkeley) 6/4/93"; static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.3 1997/04/03 07:31:55 downsj Exp $"; +static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.4 1997/04/03 08:33:06 downsj Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -69,6 +69,8 @@ extern int h_errno; struct netent *_getnetbyaddr __P((long net, int type)); struct netent *_getnetbyname __P((const char *name)); +int _hokchar __P((const char *)); + #define BYADDR 0 #define BYNAME 1 #define MAXALIASES 35 @@ -142,7 +144,11 @@ getnetanswer(answer, anslen, net_i) haveanswer = 0; while (--ancount >= 0 && cp < eom) { n = dn_expand(answer->buf, eom, cp, bp, buflen); +#ifdef USE_RESOLV_NAME_OK if ((n < 0) || !res_dnok(bp)) +#else + if ((n < 0) || !_hokchar(bp)) +#endif break; cp += n; ans[0] = '\0'; |