Author: rrs Date: Thu Feb 12 17:26:16 2009 New Revision: 188522 URL: http://svn.freebsd.org/changeset/base/188522
Log: MFC of 184030 - socket accept inherit bug. Basically accepted sockets were not inheriting the proper sock buf size. Modified: stable/7/sys/ (props changed) stable/7/sys/netinet/sctp_usrreq.c Modified: stable/7/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/7/sys/netinet/sctp_usrreq.c Thu Feb 12 16:40:48 2009 (r188521) +++ stable/7/sys/netinet/sctp_usrreq.c Thu Feb 12 17:26:16 2009 (r188522) @@ -516,9 +516,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) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"