Fix a LOR showing up with sctp_bsd_addr(): Do not hold a rt lock

when calling rt_newaddrmsg().

Reviewed by: qingli
Approved by: rrs (mentor)
MFC after: 1 month
This commit is contained in:
Michael Tuexen 2009-11-17 12:57:10 +00:00
parent a3de221dbe
commit 7f2797200f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=199365

View File

@ -1497,7 +1497,11 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum)
((struct sockaddr_dl *)rt->rt_gateway)->sdl_index =
rt->rt_ifp->if_index;
}
RT_ADDREF(rt);
RT_UNLOCK(rt);
rt_newaddrmsg(cmd, ifa, error, rt);
RT_LOCK(rt);
RT_REMREF(rt);
if (cmd == RTM_DELETE) {
/*
* If we are deleting, and we found an entry,