Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: change MP_FASTCLOSE retransmissions limit to const
MP_FASTCLOSE retransmissions limit is defined by the sysctl net.ipv4.tcp_retries2. Its default value is 15. This value also influences the timeout of an alive TCP connection, when RTO retransmissions remain unacknowledged. RFC 1122 recommends at least 100 s for the timeout, which corresponds to a value of at least 8. RFC 6824 (section 3.5) recommends a limit of 3 retransmissions. These requirements are not compatible. The limit of MP_FASTCLOSE retransmissions should not be shared with net.ipv4.tcp_retries2 but rather uses its own limit. Moreover, the limit of MP_FASTCLOSE retransmissions is implemented via a timeout (time limit), where the RFC 6824 specifies it as a count of retransmissions. This patch defines the limitations of MP_FASTCLOSE retransmissions as a constant (MPTCP_FASTCLOSE_RETRIES), replacing the sysctl tcp_retries2. The limitation of retransmissions is implemented via a count of retransmissions instead of a timeout. Exponential backoff reverting on ICMP destination unreachable is also preventively disabled on the socket used for sending MP_FASTCLOSE. It may happen that when the first MP_FASTCLOSE is sent, the retransmission counter of the socket (icsk_retransmits) is not null, due to a previous unacknowledged tcp retransmission. After the first MP_FASTCLOSE transmission, icsk_retransmits counts the number MP_FASTCLOSE retransmissions. This patch clears icsk_retransmits when the first MP_FASTCLOSE is sent, to properly count the number of MP_FASTCLOSE retransmissions. Thanks to Christoph Paasch for this suggestion. Fixes: 8248fb2 (Support sending/receiving of MPTCP_RST) Signed-off-by: François Finfe <[email protected]> Signed-off-by: Christoph Paasch <[email protected]> (cherry picked from commit d9a6284) Signed-off-by: Christoph Paasch <[email protected]>
- Loading branch information