svn commit: r184837 - head/sys/net

Kip Macy kmacy at FreeBSD.org
Tue Nov 11 01:40:28 PST 2008


Author: kmacy
Date: Tue Nov 11 09:40:27 2008
New Revision: 184837
URL: http://svn.freebsd.org/changeset/base/184837

Log:
  - Use RTFREE_LOCKED macro
  - Don't clone route on lookup (was causing arpresolve to fail)
  - u_int_32 -> uint32_t
  
  Reviewed by:	qingli
  MFC after:	3 days

Modified:
  head/sys/net/radix_mpath.c

Modified: head/sys/net/radix_mpath.c
==============================================================================
--- head/sys/net/radix_mpath.c	Tue Nov 11 08:42:59 2008	(r184836)
+++ head/sys/net/radix_mpath.c	Tue Nov 11 09:40:27 2008	(r184837)
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
 /*
  * give some jitter to hash, to avoid synchronization between routers
  */
-static u_int32_t hashjitter;
+static uint32_t hashjitter;
 
 int
 rn_mpath_capable(struct radix_node_head *rnh)
@@ -267,7 +267,7 @@ rtalloc_mpath_fib(struct route *ro, u_in
 	 */
 	if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
 		return;				 /* XXX */
-	ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, 0UL, fibnum);
+	ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, RTF_CLONING, fibnum);
 
 	/* if the route does not exist or it is not multipath, don't care */
 	if (ro->ro_rt == NULL)
@@ -299,7 +299,7 @@ rtalloc_mpath_fib(struct route *ro, u_in
 		return;
 	}
 	
-	rtfree(ro->ro_rt);
+	RTFREE_LOCKED(ro->ro_rt);
 	ro->ro_rt = (struct rtentry *)rn;
 	RT_LOCK(ro->ro_rt);
 	RT_ADDREF(ro->ro_rt);


More information about the svn-src-head mailing list