summaryrefslogtreecommitdiffstats
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-12-10 09:21:52 +0000
committerkmacy <kmacy@FreeBSD.org>2008-12-10 09:21:52 +0000
commit5c136f32ed16508d6aad90c4de48153890ff71dd (patch)
tree292ba17868cac07bf01c25812ded5c4bc7b09d9d /sys/net/route.c
parent1db5145a8d916011049ba78bd93f43d2bb21e114 (diff)
downloadFreeBSD-src-5c136f32ed16508d6aad90c4de48153890ff71dd.zip
FreeBSD-src-5c136f32ed16508d6aad90c4de48153890ff71dd.tar.gz
fix a reported panic when adding a route and one hit here when deleting a route
- pass RTF_RNH_LOCKED to rtalloc1_fib in 2 cases where the lock is held - make sure the rnh lock is held across rt_setgate and rt_getifa_fib
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 365ec1e..be71e13 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -680,7 +680,7 @@ ifa_ifwithroute_fib(int flags, struct sockaddr *dst, struct sockaddr *gateway,
if (ifa == NULL)
ifa = ifa_ifwithnet(gateway);
if (ifa == NULL) {
- struct rtentry *rt = rtalloc1_fib(gateway, 0, 0UL, fibnum);
+ struct rtentry *rt = rtalloc1_fib(gateway, 0, RTF_RNH_LOCKED, fibnum);
if (rt == NULL)
return (NULL);
/*
@@ -1161,7 +1161,7 @@ deldone:
* then we just blow it away and retry the insertion
* of the new one.
*/
- rt2 = rtalloc1_fib(dst, 0, 0, fibnum);
+ rt2 = rtalloc1_fib(dst, 0, RTF_RNH_LOCKED, fibnum);
if (rt2 && rt2->rt_parent) {
rtexpunge(rt2);
RT_UNLOCK(rt2);
OpenPOWER on IntegriCloud