From owner-p4-projects@FreeBSD.ORG Mon Jun 1 11:33:44 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 76CF01065718; Mon, 1 Jun 2009 11:33:42 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29AF5106570E for ; Mon, 1 Jun 2009 11:33:42 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 164EB8FC0A for ; Mon, 1 Jun 2009 11:33:42 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n51BXf9e060756 for ; Mon, 1 Jun 2009 11:33:41 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n51BXfQs060754 for perforce@freebsd.org; Mon, 1 Jun 2009 11:33:41 GMT (envelope-from anchie@FreeBSD.org) Date: Mon, 1 Jun 2009 11:33:41 GMT Message-Id: <200906011133.n51BXfQs060754@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Cc: Subject: PERFORCE change 163251 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 11:33:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=163251 Change 163251 by anchie@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 */