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:
parent
bb76df05a5
commit
1bb552e88d
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user