PERFORCE change 126708 for review

Kip Macy kmacy at FreeBSD.org
Sat Sep 22 22:59:01 PDT 2007


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

Change 126708 by kmacy at kmacy_home:ethng on 2007/09/23 05:58:54

	remove attempt to only call rt_check when needed
	the locking is far more convoluted than it appears

Affected files ...

.. //depot/projects/ethng/src/sys/netinet/if_ether.c#4 edit

Differences ...

==== //depot/projects/ethng/src/sys/netinet/if_ether.c#4 (text+ko) ====

@@ -358,7 +358,7 @@
 	struct llinfo_arp *la = NULL;
 	struct rtentry *rt = NULL;
 	struct sockaddr_dl *sdl;
-	int error = 0;
+	int error;
 
 	if (m->m_flags & M_BCAST) {	/* broadcast */
 		(void)memcpy(desten, ifp->if_broadcastaddr, ifp->if_addrlen);
@@ -370,11 +370,7 @@
 	}
 
 	if (rt0 != NULL) {
-		if (((rt0->rt_flags && RTF_UP) == 0) ||
-		    ((rt0->rt_flags & RTF_GATEWAY) && (rt0->rt_gateway == NULL)))
-			error = rt_check(&rt, &rt0, dst);
-		else
-			rt = rt0;
+		error = rt_check(&rt, &rt0, dst);
 		if (error) {
 			m_freem(m);
 			return error;


More information about the p4-projects mailing list