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:
parent
01fee564e1
commit
ccb66bdf1d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user