reject new connection attempts if the server's accept queue is full

This commit is contained in:
Marten Seemann
2019-01-06 13:36:52 +07:00
parent 1301610a54
commit 90514d53d1
7 changed files with 186 additions and 13 deletions

View File

@@ -53,6 +53,10 @@ const SkipPacketAveragePeriodLength PacketNumber = 500
// MaxTrackedSkippedPackets is the maximum number of skipped packet numbers the SentPacketHandler keep track of for Optimistic ACK attack mitigation
const MaxTrackedSkippedPackets = 10
// MaxAcceptQueueSize is the maximum number of sessions that the server queues for accepting.
// If the queue is full, new connection attempts will be rejected.
const MaxAcceptQueueSize = 32
// CookieExpiryTime is the valid time of a cookie
const CookieExpiryTime = 24 * time.Hour