PERFORCE change 163251 for review

Ana Kukec anchie at FreeBSD.org
Mon Jun 1 11:33:45 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=163251

Change 163251 by anchie at anchie_malimis on 2009/06/01 11:33:21

	Added comments about placing hooks for SeND in the ND code. 	
	
	Added two new, SeND-related, ICMP6 types, for Certification Path 
	Solicitation and Certification Path Advertisement.

Affected files ...

.. //depot/projects/soc2009/anchie_send/src/sys/netinet/icmp6.h#2 edit
.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#2 edit
.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6.c#2 edit
.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6_rtr.c#2 edit

Differences ...

==== //depot/projects/soc2009/anchie_send/src/sys/netinet/icmp6.h#2 (text+ko) ====

@@ -117,6 +117,9 @@
 #define ND_NEIGHBOR_ADVERT		136	/* neighbor advertisement */
 #define ND_REDIRECT			137	/* redirect */
 
+#define SEND_CERT_PATH_SOLICIT		148	/* cert path solicitation */
+#define SEND_CERT_PATH_ADVERT		149	/* cert_path advertisement */
+
 #define ICMP6_ROUTER_RENUMBERING	138	/* router renumbering */
 
 #define ICMP6_WRUREQUEST		139	/* who are you request */

==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#2 (text+ko) ====

@@ -761,6 +761,9 @@
 			goto badlen;
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
 			/* give up local */
+
+		/* send incoming SeND-protected/ND packet to sendd */
+
 			nd6_rs_input(m, off, icmp6len);
 			m = NULL;
 			goto freeit;
@@ -776,6 +779,9 @@
 		if (icmp6len < sizeof(struct nd_router_advert))
 			goto badlen;
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+
+		/* send incoming SeND-protected/ND packet to sendd */
+
 			/* give up local */
 			nd6_ra_input(m, off, icmp6len);
 			m = NULL;
@@ -792,6 +798,9 @@
 		if (icmp6len < sizeof(struct nd_neighbor_solicit))
 			goto badlen;
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+
+		/* send incoming SeND-protected/ND packet to sendd */
+
 			/* give up local */
 			nd6_ns_input(m, off, icmp6len);
 			m = NULL;
@@ -808,6 +817,9 @@
 		if (icmp6len < sizeof(struct nd_neighbor_advert))
 			goto badlen;
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+
+		/* send incoming SeND-protected/ND packet to sendd */
+
 			/* give up local */
 			nd6_na_input(m, off, icmp6len);
 			m = NULL;
@@ -824,6 +836,9 @@
 		if (icmp6len < sizeof(struct nd_redirect))
 			goto badlen;
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+
+		/* send incoming SeND-protected/ND packet to sendd */
+
 			/* give up local */
 			icmp6_redirect_input(m, off);
 			m = NULL;
@@ -833,6 +848,18 @@
 		/* m stays. */
 		break;
 
+#ifndef
+	case SEND_CERT_PATH_SOLICIT:
+		/* send CPS packet to sendd */
+		send6_cps_input();
+		break;
+
+	case SEND_CERT_PATH_ADVERT:
+		/* send CPA packet to sendd */
+		send6_cpa_input();
+		break;
+#endif
+
 	case ICMP6_ROUTER_RENUMBERING:
 		if (code != ICMP6_ROUTER_RENUMBERING_COMMAND &&
 		    code != ICMP6_ROUTER_RENUMBERING_RESULT)

==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6.c#2 (text+ko) ====

@@ -1922,6 +1922,15 @@
 		}
 		return (error);
 	}
+
+	/* send outgoing SeND/ND packet to sendd. */
+
+	/* 
+	 * In case of NS and NA, we end-up here after calling nd6_ns_output() 
+	 * or nd6_na_output(). RS, RA, and Redirect do not have such output 
+	 * routines. They are handler instead by rtadvd and rtsol daemons. 
+	 */
+
 	if ((ifp->if_flags & IFF_LOOPBACK) != 0) {
 		return ((*ifp->if_output)(origifp, m, (struct sockaddr *)dst,
 		    NULL));

==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6_rtr.c#2 (text+ko) ====

@@ -426,6 +426,27 @@
 	m_freem(m);
 }
 
+#ifndef
+/*
+ * Receive Certification Path Solicitation [rfc3971].
+ */
+void 
+send6_cps_input(struct mbuf *m, int off, int icmp6len)
+{
+}
+
+/*
+ * Receive Certification Path Advertisement [rfc3971].
+ */
+void
+send6_cpa_input(struct mbuf *m, int off, int icmp6len)
+{
+}
+
+/* send6_cps/cpa_output() should be places here as well.. */
+#endif
+
+
 /*
  * default router list proccessing sub routines
  */


More information about the p4-projects mailing list