PERFORCE change 165536 for review

Ana Kukec anchie at FreeBSD.org
Thu Jul 2 09:27:46 UTC 2009


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

Change 165536 by anchie at anchie_malimis on 2009/07/02 09:27:24

	Return IPPROTO_DONE after sending the incoming packet to the user space.	

Affected files ...

.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#14 edit

Differences ...

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

@@ -766,18 +766,20 @@
 			/* give up local */
 
 			/* Send incoming SeND-protected/ND packet to user space. */
-			if (send_output_hook != NULL)
+			if (send_output_hook != NULL) {
 				send_output_hook(m, ifp, SND_IN, ip6len);
-			else {
+				return (IPPROTO_DONE);
+			} else {
 				/* give up local */
 				nd6_rs_input(m, off, icmp6len);
 			}
 			m = NULL;
 			goto freeit;
 		}
-		if (send_output_hook != NULL)
+		if (send_output_hook != NULL) {
 			send_output_hook(n, ifp, SND_IN, ip6len);
-		else
+			return (IPPROTO_DONE);
+		} else
 			nd6_rs_input(n, off, icmp6len);
 		/* m stays. */
 		break;
@@ -791,16 +793,18 @@
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
 
 			/* Send incoming SeND-protected/ND packet to user space. */
-			if (send_output_hook != NULL)
+			if (send_output_hook != NULL) {
 				send_output_hook(m, ifp, SND_IN, ip6len);
-			else
+				return (IPPROTO_DONE);
+			} else
 				nd6_ra_input(m, off, icmp6len);
 			m = NULL;
 			goto freeit;
 		}
-		if (send_output_hook != NULL)
+		if (send_output_hook != NULL) {
 			send_output_hoo(n, ifp, SND_IN, ip6len);
-		else
+			return (IPPROTO_DONE);
+		} else
 			nd6_ra_input(n, off, icmp6len);
 		/* m stays. */
 		break;
@@ -814,18 +818,20 @@
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
 
 			/* Send incoming SeND-protected/ND packet to user space. */
-			if (send_output_hook != NULL)
+			if (send_output_hook != NULL) {
 				send_output_hook(m, ifp, SND_IN, ip6len);
-			else {
+				return (IPPROTO_DONE);
+			} else {
 				/* give up local */
 				nd6_ns_input(m, off, icmp6len);
 			}
 			m = NULL;
 			goto freeit;
 		}
-		if (send_output_hook != NULL)
+		if (send_output_hook != NULL) {
 			send_output_hook(n, ifp, SND_IN, ip6len);
-		else
+			return (IPPROTO_DONE);
+		} else
 			nd6_ns_input(n, off, icmp6len);
 		/* m stays. */
 		break;
@@ -839,9 +845,10 @@
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
 
 			/* Send incoming SeND-protected/ND packet to user space. */
-			if (send_output_hook != NULL)
+			if (send_output_hook != NULL) {
 				send_output_hook(m, ifp, SND_IN, ip6len);
-			else {
+				return (IPPROTO_DONE);
+			} else {
 				/* give up local */
 				nd6_na_input(m, off, icmp6len);
 			}
@@ -864,18 +871,20 @@
 		if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
 
 			/* Send incoming SeND-protected/ND packet to user space. */
-			if (send_output_hook != NULL)
+			if (send_output_hook != NULL) {
 				send_output_hook(m, ifp, SND_IN, ip6len);
-			else {
+				return (IPPROTO_DONE);
+			} else {
 				/* give up local */
 				icmp6_redirect_input(m, off);
 			}
 			m = NULL;
 			goto freeit;
 		}
-		if (send_output_hook != NULL)
+		if (send_output_hook != NULL) {
 			send_output_hook(n, ifp, SND_IN, ip6len);
-		else
+			return (IPPROTO_DONE);
+		} else
 			icmp6_redirect_input(n, off);
 		/* m stays. */
 		break;


More information about the p4-projects mailing list