summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/getaddrinfo.c
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-02-09 00:38:06 +0000
committershin <shin@FreeBSD.org>2000-02-09 00:38:06 +0000
commit05934f97678ef7d5925562d6cae001d60b9909bc (patch)
tree8339f4f0471246a77679a0b7883f296ede4cdce7 /lib/libc/net/getaddrinfo.c
parentfdb3a7064446f1bdec12175ccc5ede0c628a9443 (diff)
downloadFreeBSD-src-05934f97678ef7d5925562d6cae001d60b9909bc.zip
FreeBSD-src-05934f97678ef7d5925562d6cae001d60b9909bc.tar.gz
IPv6 scoped addr format is changed as recent KAME change.
KAME scoped addr format is changed recently. before: addr@scope now: scope%addr Because the end of IPv6 numeric addr is tend to be truncated in `netstat -rn ` output, so placing scope part at starting of addr will be convenient. Approved by: jkh Obtained from: KAME project
Diffstat (limited to 'lib/libc/net/getaddrinfo.c')
-rw-r--r--lib/libc/net/getaddrinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 9f0a47a..125ea69 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -707,7 +707,7 @@ explore_numeric_scope(pai, hostname, servname, res)
switch (pai->ai_family) {
#ifdef INET6
case AF_INET6:
- scope = if_nametoindex(cp);
+ scope = if_nametoindex(hostname2);
if (scope == 0) {
error = EAI_SYSTEM;
goto free;
@@ -716,7 +716,7 @@ explore_numeric_scope(pai, hostname, servname, res)
#endif
}
- error = explore_numeric(pai, hostname2, servname, res);
+ error = explore_numeric(pai, cp, servname, res);
if (error == 0) {
for (cur = *res; cur; cur = cur->ai_next) {
#ifdef INET6
OpenPOWER on IntegriCloud