1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Re-factoring for adding weighted routes introduced a

fairly irritating bug where the system will panic
when RADIX_MPATH is enabled. This change fixes this.

Approved by:	re@
This commit is contained in:
Kip Macy 2009-07-11 21:56:23 +00:00
parent 383334b383
commit 6a7bff2c31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=195624

View File

@ -987,7 +987,16 @@ rn_mpath_update(int req, struct rt_addrinfo *info,
(rt->rt_gateway->sa_len != gateway->sa_len ||
memcmp(rt->rt_gateway, gateway, gateway->sa_len)))
error = ESRCH;
goto done;
else {
/*
* remove from tree before returning it
* to the caller
*/
rn = rnh->rnh_deladdr(dst, netmask, rnh);
KASSERT(rt == RNTORT(rn), ("radix node disappeared"));
goto gwdelete;
}
}
/*
* use the normal delete code to remove
@ -1005,6 +1014,7 @@ rn_mpath_update(int req, struct rt_addrinfo *info,
*/
if ((req == RTM_DELETE) && !rt_mpath_deldup(rto, rt))
panic ("rtrequest1: rt_mpath_deldup");
gwdelete:
RT_LOCK(rt);
RT_ADDREF(rt);
if (req == RTM_DELETE) {