diff options
author | itojun <> | 2006-11-17 01:11:23 +0000 |
---|---|---|
committer | itojun <> | 2006-11-17 01:11:23 +0000 |
commit | 14bc71b6dfeebfb1d49318f5db67c7a9e009dd3c (patch) | |
tree | 2bb5cbc299c85e6e6f55ccca30a8446da04cf957 | |
parent | 74b4b85fca56a31cf3d0a952d8eb83123420b704 (diff) | |
download | openbsd-14bc71b6dfeebfb1d49318f5db67c7a9e009dd3c.tar.gz openbsd-14bc71b6dfeebfb1d49318f5db67c7a9e009dd3c.tar.bz2 openbsd-14bc71b6dfeebfb1d49318f5db67c7a9e009dd3c.zip |
change semantics of ff01::/16 to interface local multicast
(to sync up with more recent IPv6 spec)
ok from: deraadt mcbride
-rw-r--r-- | src/lib/libc/net/getaddrinfo.c | 5 | ||||
-rw-r--r-- | src/lib/libc/net/getnameinfo.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libc/net/getaddrinfo.c b/src/lib/libc/net/getaddrinfo.c index 06ab8f2095..46a44e517c 100644 --- a/src/lib/libc/net/getaddrinfo.c +++ b/src/lib/libc/net/getaddrinfo.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getaddrinfo.c,v 1.56 2006/04/18 02:57:10 ray Exp $ */ | 1 | /* $OpenBSD: getaddrinfo.c,v 1.57 2006/11/17 01:11:23 itojun Exp $ */ |
2 | /* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ | 2 | /* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ |
3 | 3 | ||
4 | /* | 4 | /* |
@@ -933,7 +933,8 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6, u_int32_t *scopeid) | |||
933 | if (*scope == '\0') | 933 | if (*scope == '\0') |
934 | return -1; | 934 | return -1; |
935 | 935 | ||
936 | if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) { | 936 | if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) || |
937 | IN6_IS_ADDR_MC_INTFACELOCAL(a6)) { | ||
937 | /* | 938 | /* |
938 | * We currently assume a one-to-one mapping between links | 939 | * We currently assume a one-to-one mapping between links |
939 | * and interfaces, so we simply use interface indices for | 940 | * and interfaces, so we simply use interface indices for |
diff --git a/src/lib/libc/net/getnameinfo.c b/src/lib/libc/net/getnameinfo.c index 4c8ee80fec..57e0ddf3be 100644 --- a/src/lib/libc/net/getnameinfo.c +++ b/src/lib/libc/net/getnameinfo.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getnameinfo.c,v 1.31 2005/06/19 04:44:34 marcm Exp $ */ | 1 | /* $OpenBSD: getnameinfo.c,v 1.32 2006/11/17 01:11:23 itojun Exp $ */ |
2 | /* $KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $ */ | 2 | /* $KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $ */ |
3 | 3 | ||
4 | /* | 4 | /* |
@@ -335,8 +335,8 @@ ip6_sa2str(const struct sockaddr_in6 *sa6, char *buf, size_t bufsiz, int flags) | |||
335 | #endif | 335 | #endif |
336 | 336 | ||
337 | /* if_indextoname() does not take buffer size. not a good api... */ | 337 | /* if_indextoname() does not take buffer size. not a good api... */ |
338 | if ((IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) && | 338 | if ((IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) || |
339 | bufsiz >= IF_NAMESIZE) { | 339 | IN6_IS_ADDR_MC_INTFACELOCAL(a6)) && bufsiz >= IF_NAMESIZE) { |
340 | char *p = if_indextoname(ifindex, buf); | 340 | char *p = if_indextoname(ifindex, buf); |
341 | if (p) { | 341 | if (p) { |
342 | return(strlen(p)); | 342 | return(strlen(p)); |