diff options
| author | niklas <> | 1999-06-04 06:38:10 +0000 |
|---|---|---|
| committer | niklas <> | 1999-06-04 06:38:10 +0000 |
| commit | dcad6225a37155780e7764469b10969251848479 (patch) | |
| tree | ad555e584d0bf0fb85386d421b09c7ce41ce820a /src/lib/libc/net/getnetnamadr.c | |
| parent | 793893d418c9fc88d4515a1edecf2984bf2a99f6 (diff) | |
| download | openbsd-dcad6225a37155780e7764469b10969251848479.tar.gz openbsd-dcad6225a37155780e7764469b10969251848479.tar.bz2 openbsd-dcad6225a37155780e7764469b10969251848479.zip | |
Be consistent about the relaxation of invalid host name checking.
This allows CNAMEs to PTRs with names including slashes, something not really
RFC-compliant but still in general use.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/net/getnetnamadr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libc/net/getnetnamadr.c b/src/lib/libc/net/getnetnamadr.c index 65a6bda900..0ebc77b656 100644 --- a/src/lib/libc/net/getnetnamadr.c +++ b/src/lib/libc/net/getnetnamadr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: getnetnamadr.c,v 1.12 1999/05/30 14:20:29 niklas Exp $ */ | 1 | /* $OpenBSD: getnetnamadr.c,v 1.13 1999/06/04 06:38:10 niklas Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1997, Jason Downs. All rights reserved. | 4 | * Copyright (c) 1997, Jason Downs. All rights reserved. |
| @@ -77,7 +77,7 @@ static char sccsid[] = "@(#)getnetbyaddr.c 8.1 (Berkeley) 6/4/93"; | |||
| 77 | static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; | 77 | static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; |
| 78 | static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; | 78 | static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; |
| 79 | #else | 79 | #else |
| 80 | static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.12 1999/05/30 14:20:29 niklas Exp $"; | 80 | static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.13 1999/06/04 06:38:10 niklas Exp $"; |
| 81 | #endif | 81 | #endif |
| 82 | #endif /* LIBC_SCCS and not lint */ | 82 | #endif /* LIBC_SCCS and not lint */ |
| 83 | 83 | ||
| @@ -192,7 +192,11 @@ getnetanswer(answer, anslen, net_i) | |||
| 192 | GETSHORT(n, cp); | 192 | GETSHORT(n, cp); |
| 193 | if (class == C_IN && type == T_PTR) { | 193 | if (class == C_IN && type == T_PTR) { |
| 194 | n = dn_expand(answer->buf, eom, cp, bp, buflen); | 194 | n = dn_expand(answer->buf, eom, cp, bp, buflen); |
| 195 | #ifdef USE_RESOLV_NAME_OK | ||
| 195 | if ((n < 0) || !res_hnok(bp)) { | 196 | if ((n < 0) || !res_hnok(bp)) { |
| 197 | #else | ||
| 198 | if ((n < 0) || !_hokchar(bp)) { | ||
| 199 | #endif | ||
| 196 | cp += n; | 200 | cp += n; |
| 197 | return (NULL); | 201 | return (NULL); |
| 198 | } | 202 | } |
