summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorrjs <rjs@NetBSD.org>2017-06-28 14:38:18 +0000
committerrjs <rjs@NetBSD.org>2017-06-28 14:38:18 +0000
commitced69af76ec3264e0bc73f1b1850ae027fc11751 (patch)
tree0a210a970564c83d3198bd2470fecc6aead2088e /sys
parent609932b787859ec523dc87c69de75a2930f60571 (diff)
Put back some commented out code.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/sctp_asconf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c
index 8e5747546e2..8d46c22a199 100644
--- a/sys/netinet/sctp_asconf.c
+++ b/sys/netinet/sctp_asconf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sctp_asconf.c,v 1.10 2017/01/17 01:24:44 ozaki-r Exp $ */
+/* $NetBSD: sctp_asconf.c,v 1.11 2017/06/28 14:38:18 rjs Exp $ */
/* $KAME: sctp_asconf.c,v 1.25 2005/06/16 20:44:24 jinmei Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_asconf.c,v 1.10 2017/01/17 01:24:44 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_asconf.c,v 1.11 2017/06/28 14:38:18 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -63,6 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: sctp_asconf.c,v 1.10 2017/01/17 01:24:44 ozaki-r Exp
#include <netinet6/ip6_var.h>
#include <netinet6/in6_pcb.h>
#include <netinet/icmp6.h>
+#include <netinet6/nd6.h>
#include <netinet6/scope6_var.h>
#include <netinet6/nd6.h>
#endif /* INET6 */
@@ -1556,8 +1557,9 @@ sctp_is_desired_interface_type(struct ifaddr *ifa)
static uint32_t
sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa)
{
- struct sockaddr_in6 *sin6 /* , *net6 */ ;
- /*struct sctp_nets *net;*/
+ struct sockaddr_in6 *sin6;
+ const struct sockaddr_in6 *net6;
+ struct sctp_nets *net;
if (sa->sa_family != AF_INET6) {
/* wrong family */
@@ -1569,13 +1571,12 @@ sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa)
/* not link local address */
return (0);
}
-#if 0
/* hunt through our destination nets list for this scope_id */
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
if ((rtcache_getdst(&net->ro))->sa_family !=
AF_INET6)
continue;
- net6 = (struct sockaddr_in6 *)rtcache_getdst(&net->ro);
+ net6 = (const struct sockaddr_in6 *)rtcache_getdst(&net->ro);
if (IN6_IS_ADDR_LINKLOCAL(&net6->sin6_addr) == 0)
continue;
if (sctp_is_same_scope(sin6, net6)) {
@@ -1583,7 +1584,6 @@ sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa)
return (1);
}
}
-#endif
/* didn't find one */
return (0);
}