Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Aug 2009 19:49:46 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 167415 for review
Message-ID:  <200908161949.n7GJnkss013004@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908161949.n7GJnkss013004>