New sockets (accepted) were not inheriting the proper snd/rcv buffer value.

Obtained from:	 Michael Tuexen
This commit is contained in:
Randall Stewart 2008-10-18 15:56:12 +00:00
parent 1862b24533
commit ac29704161
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184030

View File

@ -517,9 +517,11 @@ sctp_attach(struct socket *so, int proto, struct thread *p)
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
return EINVAL;
}
error = SCTP_SORESERVE(so, SCTP_BASE_SYSCTL(sctp_sendspace), SCTP_BASE_SYSCTL(sctp_recvspace));
if (error) {
return error;
if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
error = SCTP_SORESERVE(so, SCTP_BASE_SYSCTL(sctp_sendspace), SCTP_BASE_SYSCTL(sctp_recvspace));
if (error) {
return error;
}
}
error = sctp_inpcb_alloc(so, vrf_id);
if (error) {