diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2004-11-17 01:42:27 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2004-11-17 01:42:27 +0000 |
commit | 5bdda421fcda8ae2b6574e46f0d4dcd52009bff1 (patch) | |
tree | 6da3edfb39259365f33eba61d7ae199d60437dc5 | |
parent | eb05b22dc62a1aaa97fbddaec46d752b2c22a5ff (diff) |
remove NI_WITHSCOPEID (which is not standard)
-rw-r--r-- | lib/libc/net/rcmd.c | 20 | ||||
-rw-r--r-- | lib/libc/net/res_send.c | 9 |
2 files changed, 5 insertions, 24 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index 769e85e0a42..b99a35b38cf 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -29,7 +29,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rcmd.c,v 1.48 2003/09/25 21:14:46 millert Exp $"; +static char *rcsid = "$OpenBSD: rcmd.c,v 1.49 2004/11/17 01:42:26 itojun Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -161,11 +161,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af) if (r->ai_next) { int oerrno = errno; char hbuf[NI_MAXHOST]; -#ifdef NI_WITHSCOPEID - const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflags = NI_NUMERICHOST; -#endif hbuf[0] = '\0'; if (getnameinfo(r->ai_addr, r->ai_addrlen, @@ -610,9 +606,6 @@ bail: /* * Returns "true" if match, 0 if no match. If we do not find any * semblance of an A->PTR->A loop, allow a simple #.#.#.# match to work. - * - * NI_WITHSCOPEID is useful for comparing sin6_scope_id portion - * if af == AF_INET6. */ static int __icheckhost(raddr, salen, lhost) @@ -623,11 +616,7 @@ __icheckhost(raddr, salen, lhost) struct addrinfo hints, *res, *r; char h1[NI_MAXHOST], h2[NI_MAXHOST]; int error; -#ifdef NI_WITHSCOPEID - const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflags = NI_NUMERICHOST; -#endif h1[0] = '\0'; if (getnameinfo(raddr, salen, h1, sizeof(h1), NULL, 0, @@ -666,9 +655,6 @@ __icheckhost(raddr, salen, lhost) * Return the hostname associated with the supplied address. * Do a reverse lookup as well for security. If a loop cannot * be found, pack the result of inet_ntoa() into the string. - * - * NI_WITHSCOPEID is useful for comparing sin6_scope_id portion - * if af == AF_INET6. */ static char * __gethostloop(raddr, salen) @@ -679,11 +665,7 @@ __gethostloop(raddr, salen) char h1[NI_MAXHOST], h2[NI_MAXHOST]; struct addrinfo hints, *res, *r; int error; -#ifdef NI_WITHSCOPEID - const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID; -#else const int niflags = NI_NUMERICHOST; -#endif h1[0] = remotehost[0] = '\0'; if (getnameinfo(raddr, salen, remotehost, sizeof(remotehost), diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c index c456a92d329..51fa7771422 100644 --- a/lib/libc/net/res_send.c +++ b/lib/libc/net/res_send.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send.c,v 1.15 2003/06/02 20:18:36 millert Exp $ */ +/* $OpenBSD: res_send.c,v 1.16 2004/11/17 01:42:26 itojun Exp $ */ /* * ++Copyright++ 1985, 1989, 1993 @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$From: res_send.c,v 8.12 1996/10/08 04:51:06 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: res_send.c,v 1.15 2003/06/02 20:18:36 millert Exp $"; +static char rcsid[] = "$OpenBSD: res_send.c,v 1.16 2004/11/17 01:42:26 itojun Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -139,8 +139,7 @@ static void Perror(FILE *, char *, int); if (_resp->options & RES_DEBUG) { if (getnameinfo(address, address->sa_len, abuf, sizeof(abuf), - pbuf, sizeof(pbuf), - NI_NUMERICHOST|NI_NUMERICSERV|NI_WITHSCOPEID) != 0) { + pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV) != 0) { strlcpy(abuf, "?", sizeof(abuf)); strlcpy(pbuf, "?", sizeof(pbuf)); } @@ -432,7 +431,7 @@ res_send(buf, buflen, ans, anssiz) Dprint((_resp->options & RES_DEBUG) && getnameinfo(nsap, salen, abuf, sizeof(abuf), - NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID) == 0, + NULL, 0, NI_NUMERICHOST) == 0, (stdout, ";; Querying server (# %d) address = %s\n", ns + 1, abuf)); |