summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2006-11-17 01:11:24 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2006-11-17 01:11:24 +0000
commitd47bdeb6300d8da6e915c6e5f97a3d3d6b7e4b5d (patch)
treea7a1d754c5bbab5286abc8c4377cf6af4a694d4e /sbin
parentf90ac2555337c72651bc65977807ddf57df6db9a (diff)
change semantics of ff01::/16 to interface local multicast
(to sync up with more recent IPv6 spec) ok from: deraadt mcbride
Diffstat (limited to 'sbin')
-rw-r--r--sbin/route/route.c5
-rw-r--r--sbin/route/show.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index dd36cfaf0d7..6afc1080f34 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.101 2006/10/15 09:44:25 mcbride Exp $ */
+/* $OpenBSD: route.c,v 1.102 2006/11/17 01:11:23 itojun Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -761,7 +761,8 @@ getaddr(int which, char *s, struct hostent **hpp)
memcpy(&su->sin6, res->ai_addr, sizeof(su->sin6));
freeaddrinfo(res);
if ((IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr) ||
- IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr)) &&
+ IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr) ||
+ IN6_IS_ADDR_MC_INTFACELOCAL(&su->sin6.sin6_addr)) &&
su->sin6.sin6_scope_id) {
*(u_int16_t *)&su->sin6.sin6_addr.s6_addr[2] =
htons(su->sin6.sin6_scope_id);
diff --git a/sbin/route/show.c b/sbin/route/show.c
index 21fb61228f5..e65d1661794 100644
--- a/sbin/route/show.c
+++ b/sbin/route/show.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: show.c,v 1.54 2006/06/16 17:46:43 henning Exp $ */
+/* $OpenBSD: show.c,v 1.55 2006/11/17 01:11:23 itojun Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
@@ -465,7 +465,8 @@ p_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags, int width)
* sin6_scope_id field of SA should be set in the future.
*/
if (IN6_IS_ADDR_LINKLOCAL(in6) ||
- IN6_IS_ADDR_MC_LINKLOCAL(in6)) {
+ IN6_IS_ADDR_MC_LINKLOCAL(in6) ||
+ IN6_IS_ADDR_MC_INTFACELOCAL(in6)) {
/* XXX: override is ok? */
sa6->sin6_scope_id = (u_int32_t)ntohs(*(u_short *)
&in6->s6_addr[2]);
@@ -546,7 +547,8 @@ routename(struct sockaddr *sa)
sin6.sin6_family = AF_INET6;
if (sa->sa_len == sizeof(struct sockaddr_in6) &&
(IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) ||
- IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) &&
+ IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) ||
+ IN6_IS_ADDR_MC_INTFACELOCAL(&sin6.sin6_addr)) &&
sin6.sin6_scope_id == 0) {
sin6.sin6_scope_id =
ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);