summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-03-11 20:52:01 +0000
committershin <shin@FreeBSD.org>2000-03-11 20:52:01 +0000
commitc7af3d33b2315221c93264a530fc3b8c62a45121 (patch)
treecccb2aa7e0740f54fa912fc24ed15181bdf1fb73 /sbin
parente044d421774440592faa23c351f4773f7de640c3 (diff)
downloadFreeBSD-src-c7af3d33b2315221c93264a530fc3b8c62a45121.zip
FreeBSD-src-c7af3d33b2315221c93264a530fc3b8c62a45121.tar.gz
Clear sin6_scope_id before passing routes into kernel, becaues kernel
don't support routes with sin6_scope_id set. Without this fix, routes with IPv6 scoped addr won't work when it is assigned by "route" command. Approved by: jkh Reviewed by: ume
Diffstat (limited to 'sbin')
-rw-r--r--sbin/route/route.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index e06017e..a25ee24 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -928,6 +928,7 @@ getaddr(which, s, hpp)
if (IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr))
*(u_short *)&su->sin6.sin6_addr.s6_addr[2] =
ntohs(su->sin6.sin6_scope_id);
+ su->sin6.sin6_scope_id = 0;
return 0;
}
#endif
OpenPOWER on IntegriCloud