summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_src.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-09-10 17:52:06 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-09-10 17:52:06 +0000
commit950254d909152efb61b61dec32ad79a3f0d2e200 (patch)
treec80bc28d1c1f2e99cca53d1b7c864a44c849e6cc /sys/netinet6/in6_src.c
parentebc7ce9e5c64c6d8611ada6e67026a561d0b15f0 (diff)
It is time to put inet6 on a diet. Use the flensing knife and cut out
the 3rd argument of in6_recoverscope() and make it return void. OK dlg@ mikeb@
Diffstat (limited to 'sys/netinet6/in6_src.c')
-rw-r--r--sys/netinet6/in6_src.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 5383d9227d4..d040eeb32db 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_src.c,v 1.55 2015/09/03 14:59:23 mpi Exp $ */
+/* $OpenBSD: in6_src.c,v 1.56 2015/09/10 17:52:05 claudio Exp $ */
/* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */
/*
@@ -641,9 +641,8 @@ in6_embedscope(struct in6_addr *in6, const struct sockaddr_in6 *sin6,
* this function should be nuked in the future, when we get rid of
* embedded scopeid thing.
*/
-int
-in6_recoverscope(struct sockaddr_in6 *sin6, const struct in6_addr *in6,
- struct ifnet *ifp)
+void
+in6_recoverscope(struct sockaddr_in6 *sin6, const struct in6_addr *in6)
{
u_int32_t scopeid;
@@ -661,17 +660,10 @@ in6_recoverscope(struct sockaddr_in6 *sin6, const struct in6_addr *in6,
*/
scopeid = ntohs(sin6->sin6_addr.s6_addr16[1]);
if (scopeid) {
- /* sanity check */
- if (if_get(scopeid) == NULL)
- return ENXIO;
- if (ifp && ifp->if_index != scopeid)
- return ENXIO;
sin6->sin6_addr.s6_addr16[1] = 0;
sin6->sin6_scope_id = scopeid;
}
}
-
- return 0;
}
/*