summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/sctp6_usrreq.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-03-19 06:53:02 +0000
committerrrs <rrs@FreeBSD.org>2007-03-19 06:53:02 +0000
commitaf970e3016805a81bd955a154f67086cd68daaa0 (patch)
treef1e1b2a5f87feb92e42f13f0cbbd9dc84f4c596b /sys/netinet6/sctp6_usrreq.c
parent40843dd888818f89cbcb66dac8c424df851f6e7b (diff)
downloadFreeBSD-src-af970e3016805a81bd955a154f67086cd68daaa0.zip
FreeBSD-src-af970e3016805a81bd955a154f67086cd68daaa0.tar.gz
- errno -> becomes error in sctp_output.c and sctputil.c
- SB_CLEAR macro defined and used for sb clearing. - Fix for CMT express_sack_handling did not do proper pseudo-cumack updates. - Get rid of extraneous function that was never used ip_2_ip6_hdr() - Fixed source address selection bug (initialization problem). - Source address selection debug added.
Diffstat (limited to 'sys/netinet6/sctp6_usrreq.c')
-rw-r--r--sys/netinet6/sctp6_usrreq.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c
index cb1c006..7fba888 100644
--- a/sys/netinet6/sctp6_usrreq.c
+++ b/sys/netinet6/sctp6_usrreq.c
@@ -517,20 +517,13 @@ sctp_must_try_again:
#endif
sctp_inpcb_free(inp, 1, 0);
SOCK_LOCK(so);
- so->so_snd.sb_cc = 0;
- so->so_snd.sb_mb = NULL;
- so->so_snd.sb_mbcnt = 0;
-
+ SCTP_SB_CLEAR(so->so_snd);
/*
* same for the rcv ones, they are only here for the
* accounting/select.
*/
- so->so_rcv.sb_cc = 0;
- so->so_rcv.sb_mb = NULL;
- so->so_rcv.sb_mbcnt = 0;
- /*
- * Now null out the reference, we are completely detached.
- */
+ SCTP_SB_CLEAR(so->so_rcv);
+ /* Now null out the reference, we are completely detached. */
so->so_pcb = NULL;
SOCK_UNLOCK(so);
} else {
@@ -554,7 +547,7 @@ sctp6_attach(struct socket *so, int proto, struct thread *p)
return EINVAL;
if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
- error = soreserve(so, sctp_sendspace, sctp_recvspace);
+ error = SCTP_SORESERVE(so, sctp_sendspace, sctp_recvspace);
if (error)
return error;
}
@@ -677,20 +670,13 @@ sctp_must_try_again:
* the SCTP association.
*/
SOCK_LOCK(so);
- so->so_snd.sb_cc = 0;
- so->so_snd.sb_mb = NULL;
- so->so_snd.sb_mbcnt = 0;
-
+ SCTP_SB_CLEAR(so->so_snd);
/*
* same for the rcv ones, they are only here for the
* accounting/select.
*/
- so->so_rcv.sb_cc = 0;
- so->so_rcv.sb_mb = NULL;
- so->so_rcv.sb_mbcnt = 0;
- /*
- * Now null out the reference, we are completely detached.
- */
+ SCTP_SB_CLEAR(so->so_rcv);
+ /* Now null out the reference, we are completely detached. */
so->so_pcb = NULL;
SOCK_UNLOCK(so);
} else {
OpenPOWER on IntegriCloud