From owner-p4-projects@FreeBSD.ORG Sun Aug 16 19:49:47 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CBA31065692; Sun, 16 Aug 2009 19:49:47 +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 60F1B106568E for ; Sun, 16 Aug 2009 19:49:47 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5010F8FC52 for ; Sun, 16 Aug 2009 19:49:47 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7GJnkaV013006 for ; Sun, 16 Aug 2009 19:49:46 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7GJnkss013004 for perforce@freebsd.org; Sun, 16 Aug 2009 19:49:46 GMT (envelope-from bz@freebsd.org) Date: Sun, 16 Aug 2009 19:49:46 GMT Message-Id: <200908161949.n7GJnkss013004@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" To: Perforce Change Reviews Cc: Subject: PERFORCE change 167415 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: Sun, 16 Aug 2009 19:49:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=167415 Change 167415 by bz@bz_zoo on 2009/08/16 19:49:05 - remove some dead code. - start removing return (IPPROTO_DONE) as we can actually fall through the normal code path and everything will be fine. TODO: finish the last item for all cases. Affected files ... .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#22 edit Differences ... ==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#22 (text+ko) ==== @@ -782,7 +782,6 @@ if (send_input_hook != NULL) { IP6_EXTHDR_CHECK(m, off, icmp6len, IPPROTO_DONE); send_input_hook(m, ifp, SND_IN, ip6len); - return (IPPROTO_DONE); } else { /* give up local */ nd6_rs_input(m, off, icmp6len); @@ -833,16 +832,10 @@ goto badcode; if (icmp6len < sizeof(struct nd_neighbor_solicit)) goto badlen; -#if 0 - if ((n = m_copypacket(m, M_DONTWAIT)) == NULL) { -#endif if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) { -#if 0 - if ((n = m_dup(m, M_DONTWAIT)) == NULL) { -#endif - /* Send incoming SeND/ND packet to user space. */ if (send_input_hook != NULL) { - printf("icmp6.c: send_input_hook 1\n"); + /* Send incoming SeND/ND packet to user space. */ + printf("%s: send_input_hook m=%p\n", __func__, m); send_input_hook(m, ifp, SND_IN, ip6len); } else { /* give up local */ @@ -852,9 +845,9 @@ goto freeit; } if (send_input_hook != NULL) { - printf("icmp6.c: send_input_hook 2\n"); + /* Send incoming SeND/ND packet to user space. */ + printf("%s: send_input_hook n=%p\n", __func__, n); send_input_hook(n, ifp, SND_IN, ip6len); - return (IPPROTO_DONE); } else nd6_ns_input(n, off, icmp6len); /* m stays. */ @@ -879,10 +872,9 @@ m = NULL; goto freeit; } - if (send_input_hook != NULL) { + if (send_input_hook != NULL) send_input_hook(n, ifp, SND_IN, ip6len); - return (IPPROTO_DONE); - } else + else nd6_na_input(n, off, icmp6len); /* m stays. */ break;