summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_var.h
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-10-01 03:22:29 +0000
committerrrs <rrs@FreeBSD.org>2007-10-01 03:22:29 +0000
commitdfb6039bc1916c3c54f9056eccab33f9b48cb2dd (patch)
treedf107823c116a7a5ad3ea835f97e50936a6b26ee /sys/netinet/sctp_var.h
parentd60b8a3096c2760d921f7f4b6e99280cb82f8c7b (diff)
downloadFreeBSD-src-dfb6039bc1916c3c54f9056eccab33f9b48cb2dd.zip
FreeBSD-src-dfb6039bc1916c3c54f9056eccab33f9b48cb2dd.tar.gz
- Bug fix managing congestion parameter on immediate
retransmittion by handover event (fast mobility code) - Fixed problem of mobility code which is caused by remaining parameters in the deleted primary destination. - Add a missing lock. When a peer sends an INIT, and while we are processing it to send an INIT-ACK the socket is closed, we did not hold a lock to keep the socket from going away. Add protection for this case. - Fix so that arwnd is alway uses the minimal rwnd if the user has set the socket buffer smaller. Found this when the test org decided to see what happens when you set in a rwnd of 10 bytes (which is not allowed per RFC .. 4k is minimum). - Fixes so a cookie-echo ootb will NOT cause an abort to be sent. This was happening in a MPI collision case. - Examined all panics and unless there was no recovery, moved any that were not already to INVARANTS. Approved by: re@freebsd.org (gnn)
Diffstat (limited to 'sys/netinet/sctp_var.h')
-rw-r--r--sys/netinet/sctp_var.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h
index 8bc6ffd..c4af433 100644
--- a/sys/netinet/sctp_var.h
+++ b/sys/netinet/sctp_var.h
@@ -54,9 +54,11 @@ extern struct pr_usrreqs sctp_usrreqs;
#define sctp_is_mobility_feature_on(inp, feature) (inp->sctp_mobility_features & feature)
#define sctp_is_mobility_feature_off(inp, feature) ((inp->sctp_mobility_features & feature) == 0)
-#define sctp_sbspace(asoc, sb) ((long) (((sb)->sb_hiwat > (asoc)->sb_cc) ? ((sb)->sb_hiwat - (asoc)->sb_cc) : 0))
+#define sctp_maxspace(sb) (max((sb)->sb_hiwat,SCTP_MINIMAL_RWND))
-#define sctp_sbspace_failedmsgs(sb) ((long) (((sb)->sb_hiwat > (sb)->sb_cc) ? ((sb)->sb_hiwat - (sb)->sb_cc) : 0))
+#define sctp_sbspace(asoc, sb) ((long) (sctp_maxspace(sb) > (asoc)->sb_cc) ? (sctp_maxspace(sb) - (asoc)->sb_cc) : 0)
+
+#define sctp_sbspace_failedmsgs(sb) ((long) ((sctp_maxspace(sb) > (sb)->sb_cc) ? (sctp_maxspace(sb) - (sb)->sb_cc) : 0))
#define sctp_sbspace_sub(a,b) ((a > b) ? (a - b) : 0)
OpenPOWER on IntegriCloud