small radix_mpath patch
Kip Macy
kmacy at freebsd.org
Fri Nov 7 14:30:46 PST 2008
Calling arpresolve on an rtentry looked up by rtalloc_mpath_fib won't
work because a gratuitous clone route is created without llinfo
attached. As far as I can tell, routes should only ever be cloned for
initial host route creation during a resolve to store arp information.
Index: sys/net/radix_mpath.c
===================================================================
--- sys/net/radix_mpath.c (revision 184756)
+++ sys/net/radix_mpath.c (working copy)
@@ -54,7 +54,7 @@
/*
* 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 @@
*/
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 @@
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 freebsd-net
mailing list