PERFORCE change 181510 for review

Bjoern A. Zeeb bz at FreeBSD.org
Wed Jul 28 13:51:49 UTC 2010


http://p4web.freebsd.org/@@181510?ac=10

Change 181510 by bz at bz_dumpster on 2010/07/28 13:51:29

	Minimize diffs to HEAD avoiding unneeded (changes in) initialization.
	Change some whitespace.

Affected files ...

.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#46 edit
.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6.c#37 edit
.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#48 edit

Differences ...

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

@@ -415,7 +415,7 @@
 	int icmp6len = m->m_pkthdr.len - *offp;
 	int code, sum, noff;
 	char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN];
-	int ip6len, error = -1;
+	int ip6len, error;
 
 	ifp = m->m_pkthdr.rcvif;
 

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

@@ -1769,14 +1769,10 @@
 	struct m_tag *mtag;
 	struct llentry *ln = lle;
 	struct ip6_hdr *ip6;
-	int error = -1;
+	int error = 0;
 	int flags = 0;
 	int ip6len;
-	unsigned short *nd_type;
 
-	ip6 = mtod(m, struct ip6_hdr *);
-	ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen);
-
 #ifdef INVARIANTS
 	if (lle != NULL) {
 		
@@ -1951,11 +1947,12 @@
 	mac_netinet6_nd6_send(ifp, m);
 #endif
 
-	/* send outgoing NS/NA/REDIRECT packet to sendd. */
+	/* Send outgoing NS/NA/REDIRECT packet to sendd. */
 	if (send_sendso_input_hook != NULL) {
 		mtag = m_tag_find(m, PACKET_TAG_ND_OUTGOING, NULL);
 		if (mtag != NULL) {
-			nd_type = (unsigned short *)(mtag + 1);
+			ip6 = mtod(m, struct ip6_hdr *);
+			ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen);
 			/* Use the SEND socket */
 			error = send_sendso_input_hook(m, SND_OUT,
 			    ip6len);
@@ -1972,7 +1969,6 @@
 	 * a list of mbufs to send and transmit them in the caller
 	 * after the lock is dropped
 	 */
-
 	if (lle != NULL) {
 		if (*chain == NULL)
 			*chain = m;
@@ -2019,7 +2015,6 @@
 	}
 	if (m)
 		m_freem(m);
-
 	return (error);
 }
 #undef senderr

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

@@ -282,8 +282,10 @@
 static int
 send_modevent(module_t mod, int type, void *unused)
 {
+#ifdef __notyet__
 	VNET_ITERATOR_DECL(vnet_iter);
-	int error = 0;
+#endif
+	int error;
 
 	switch (type) {
 	case MOD_LOAD:
@@ -297,8 +299,8 @@
 		break;
 	case MOD_UNLOAD:
 		/* Do not allow unloading w/o locking. */
-		return(EBUSY);
-#ifdef 0
+		return (EBUSY);
+#ifdef __notyet__
 		VNET_FOREACH(vnet_iter) {
 			CURVNET_SET(vnet_iter);
 			if (V_send_so != NULL) {
@@ -312,6 +314,7 @@
 		send_sendso_input_hook = NULL;
 		break;
 	default:
+		error = 0;
 		break;
 	}
 


More information about the p4-projects mailing list