Date: Fri, 7 Nov 2008 22:30:45 +0000 From: "Kip Macy" <kmacy@freebsd.org> To: freebsd-net@freebsd.org Subject: small radix_mpath patch Message-ID: <3c1674c90811071430s1f07ba6cp372609809ef7f591@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3c1674c90811071430s1f07ba6cp372609809ef7f591>
