Module Name:    src
Committed By:   rjs
Date:           Wed Jun 28 14:38:18 UTC 2017

Modified Files:
        src/sys/netinet: sctp_asconf.c

Log Message:
Put back some commented out code.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/netinet/sctp_asconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/sctp_asconf.c
diff -u src/sys/netinet/sctp_asconf.c:1.10 src/sys/netinet/sctp_asconf.c:1.11
--- src/sys/netinet/sctp_asconf.c:1.10	Tue Jan 17 01:24:44 2017
+++ src/sys/netinet/sctp_asconf.c	Wed Jun 28 14:38:18 2017
@@ -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.
 #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 if
 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 
 		/* 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 
 			return (1);
 		}
 	}
-#endif
 	/* didn't find one */
 	return (0);
 }

Reply via email to