Author: rrs
Date: Sat Oct 18 15:56:12 2008
New Revision: 184030
URL: http://svn.freebsd.org/changeset/base/184030
Log:
New sockets (accepted) were not inheriting the proper snd/rcv buffer value.
Obtained from: Michael Tuexen
Modified:
head/sys/netinet/sctp_usrreq.c
Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c Sat Oct 18 15:55:15 2008
(r184029)
+++ head/sys/netinet/sctp_usrreq.c Sat Oct 18 15:56:12 2008
(r184030)
@@ -517,9 +517,11 @@ sctp_attach(struct socket *so, int proto
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) {
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"