Skip to content

Commit

Permalink
Initialize the send and receive buffer to the sysctl values.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuexen committed May 12, 2016
1 parent 23dc752 commit 9862333
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 8 additions & 0 deletions usrsctplib/netinet/sctp_sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,21 @@ struct sctp_sysctl {
#define SCTPCTL_MAXDGRAM_DESC "Maximum outgoing SCTP buffer size"
#define SCTPCTL_MAXDGRAM_MIN 0
#define SCTPCTL_MAXDGRAM_MAX 0xFFFFFFFF
#if defined(__Userspace__)
#define SCTPCTL_MAXDGRAM_DEFAULT SB_MAX
#else
#define SCTPCTL_MAXDGRAM_DEFAULT 262144 /* 256k */
#endif

/* recvspace: Maximum incoming SCTP buffer size */
#define SCTPCTL_RECVSPACE_DESC "Maximum incoming SCTP buffer size"
#define SCTPCTL_RECVSPACE_MIN 0
#define SCTPCTL_RECVSPACE_MAX 0xFFFFFFFF
#if defined(__Userspace__)
#define SCTPCTL_RECVSPACE_DEFAULT SB_RAW
#else
#define SCTPCTL_RECVSPACE_DEFAULT 262144 /* 256k */
#endif

/* autoasconf: Enable SCTP Auto-ASCONF */
#define SCTPCTL_AUTOASCONF_DESC "Enable SCTP Auto-ASCONF"
Expand Down
2 changes: 0 additions & 2 deletions usrsctplib/netinet/sctp_usrreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ sctp_init(void)
sctp_recvspace = SB_MAX;

#elif defined(__Userspace__)
SCTP_BASE_SYSCTL(sctp_sendspace) = SB_MAX;
SCTP_BASE_SYSCTL(sctp_recvspace) = SB_RAW;
SCTP_BASE_SYSCTL(sctp_udp_tunneling_port) = port;
#else
#if !defined(__APPLE__)
Expand Down

0 comments on commit 9862333

Please sign in to comment.