Fixes a missing unlock in the one-2-one hash table, if

it was full and a collision occured, then we would leave
a inp locked. Also fixes a missing inp unlock if IPSEC was
on and it failed during the attach. Bug found by Weongyo Jeong.
This commit is contained in:
Randall Stewart 2007-05-04 15:19:10 +00:00
parent bb76df05a5
commit 1bb552e88d
2 changed files with 4 additions and 0 deletions

View File

@ -521,6 +521,7 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from,
continue;
}
if (lport != inp->sctp_lport) {
SCTP_INP_RUNLOCK(inp);
continue;
}
if (inp->def_vrf_id != vrf_id) {

View File

@ -513,7 +513,10 @@ sctp_attach(struct socket *so, int proto, struct thread *p)
#ifdef SCTP_LOG_CLOSING
sctp_log_closing(inp, NULL, 15);
#endif
SCTP_INP_WUNLOCK(inp);
sctp_inpcb_free(inp, 1, 0);
} else {
SCTP_INP_WUNLOCK(inp);
}
return error;
}