summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2016-02-02 05:57:59 +0000
committeralfred <alfred@FreeBSD.org>2016-02-02 05:57:59 +0000
commitb04e8a547e7e868f83d0fab68feb768770323303 (patch)
tree1d237b239ea69d18618f1b1b173368ea98474a31 /sys/netinet
parent578b3baef33491b548d2f0443135e50d55f2b2c2 (diff)
downloadFreeBSD-src-b04e8a547e7e868f83d0fab68feb768770323303.zip
FreeBSD-src-b04e8a547e7e868f83d0fab68feb768770323303.tar.gz
Increase max allowed backlog for listen sockets
from short to int. PR: 203922 Submitted by: White Knight <white_knight@2ch.net> MFC After: 4 weeks
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_sysctl.c4
-rw-r--r--sys/netinet/sctp_uio.h10
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c
index b72e896..e197936 100644
--- a/sys/netinet/sctp_sysctl.c
+++ b/sys/netinet/sctp_sysctl.c
@@ -426,7 +426,11 @@ sctp_sysctl_handle_assoclist(SYSCTL_HANDLER_ARGS)
xinpcb.maxqlen = 0;
} else {
xinpcb.qlen = so->so_qlen;
+ xinpcb.qlen_old = so->so_qlen > USHRT_MAX ?
+ USHRT_MAX : (uint16_t) so->so_qlen;
xinpcb.maxqlen = so->so_qlimit;
+ xinpcb.maxqlen_old = so->so_qlimit > USHRT_MAX ?
+ USHRT_MAX : (uint16_t) so->so_qlimit;
}
SCTP_INP_INCR_REF(inp);
SCTP_INP_RUNLOCK(inp);
diff --git a/sys/netinet/sctp_uio.h b/sys/netinet/sctp_uio.h
index cfc7978..2299f66 100644
--- a/sys/netinet/sctp_uio.h
+++ b/sys/netinet/sctp_uio.h
@@ -1170,13 +1170,15 @@ struct xsctp_inpcb {
uint32_t total_nospaces;
uint32_t fragmentation_point;
uint16_t local_port;
- uint16_t qlen;
- uint16_t maxqlen;
+ uint16_t qlen_old;
+ uint16_t maxqlen_old;
void *socket;
+ uint32_t qlen;
+ uint32_t maxqlen;
#if defined(__LP64__)
- uint32_t extra_padding[29]; /* future */
+ uint32_t extra_padding[27]; /* future */
#else
- uint32_t extra_padding[30]; /* future */
+ uint32_t extra_padding[28]; /* future */
#endif
};
OpenPOWER on IntegriCloud