Repository navigation
Force MP_FASTCLOSE on MPTCP teardown (#54 follow-up) - #67
Merged
Merged
Conversation
Setting SO_LINGER=0 and dropping a tokio::TcpStream is enough to make the kernel emit a RST on plain TCP, but not on MPTCP. Linux's __mptcp_close() only routes through mptcp_do_fastclose() when the receive queue still has unread MPTCP data or the linger timeout is negative — neither holds for a normal upload-only test that hits its deadline. The result was a slow graceful FIN/drain instead of an abortive close, leaving the connection visibly active on the wire long after the test reported complete. matttbe traced this to the MPTCP close gating; mptcp_disconnect() (entered via connect(fd, AF_UNSPEC)) does set MPTCP_CF_FASTCLOSE and emits MP_FASTCLOSE on every subflow, which is what we want. Add force_abortive_close_if_mptcp() called at every sender teardown path (normal exit + error exit, both send_data and send_data_half). It probes getsockopt(TCP_IS_MPTCP) and only calls connect(AF_UNSPEC) when the kernel confirms the socket is an active MPTCP connection; plain TCP sockets are unaffected. Order is intentional: runs after the final tcp_info capture and bytes_sent clamp, since connect(AF_UNSPEC) resets connection state and would skew any subsequent tcpi_bytes_acked read. While here, stop swallowing set_linger errors silently — log them at debug level so a kernel that rejects SO_LINGER on a future MPTCP variant won't leave us guessing. Verified in the test-mptcp-ns reproducer (-P 4 --mptcp -t 1sec): post-deadline wire activity drops from ~700ms of FIN drain to ~30ms of MP_FASTCLOSE/RST. TCP_IS_MPTCP (43) is hard-coded since libc doesn't expose it; matches linux-raw-sys across architectures. Issue #54.
The bidir failure mode flagged in review: send_data_half's fastclose disconnects the shared socket via connect(AF_UNSPEC), which makes the concurrent receive_data_half wake with NotConnected. Same shape applies to peer-initiated MP_FASTCLOSE: a healthy connection mid-test sees an ECONNRESET that previous code would have surfaced as a WARN. Both are expected teardown, not real errors. Widen is_peer_closed_error to include NotConnected (the local-side symptom of our own fastclose), and have receive_data and receive_data_half treat any peer-closed-style error as a suppressed-teardown break, regardless of whether cancel has fired yet. cancelled is set from *cancel.borrow() so drain_after_cancel still only runs for genuine cancel paths. Trade-off acknowledged: a real mid-test peer reset (NAT timeout, etc.) no longer surfaces as Err from receive_data; it's counted as a suppressed teardown error and the function returns Ok. The control- plane result message and the suppressed-teardown debug counter still expose serious failures. Better than logging every MPTCP fastclose as an error. Also: - Restore the [0.9.9] release heading that an earlier Edit accidentally consumed when adding the new Unreleased entry. - Delete the dead non-Linux force_abortive_close_if_mptcp stub. All call sites were already inside #[cfg(target_os = "linux")] blocks. - Add receive_data_suppresses_peer_initiated_reset regression test: client side sets SO_LINGER=0 and drops, server-side receive_data must return Ok rather than Err on the resulting RST. cancel is never fired so the assertion proves the suppression — not the cancel branch — is what made the function exit cleanly.
TCP_IS_MPTCP only landed in Linux 6.10. xfr advertises MPTCP support for 5.6+, so on 5.6-6.9 the fastclose path was a silent no-op even though the underlying connect(AF_UNSPEC) trick works there too. This silently ate the fix for users on Ubuntu 22.04 (5.15) and similar LTS-era kernels with MPTCP backports. Add a second probe: getsockopt(SOL_MPTCP, MPTCP_INFO) which has been present since Linux 5.16. Succeeds on actual MPTCP sockets, returns EOPNOTSUPP on plain TCP. We don't read the contents — just check the return code. Buffer is oversized (256 bytes) to absorb future struct growth without recompiling. Coverage matrix after this change: - 6.10+: TCP_IS_MPTCP path (fast, unambiguous). - 5.16-6.9: MPTCP_INFO fallback path. Adds one extra getsockopt for pre-6.10 plain TCP teardowns; negligible. - 5.6-5.15: neither probe; falls through to graceful close, same as prior behavior. Verified locally on Linux 6.17: --mptcp test still emits exactly 1 connect(AF_UNSPEC) per stream; plain TCP test emits 0. PR #67 review follow-up (Codex medium finding).
matttbe
added a commit
to matttbe/xfr
that referenced
this pull request
Apr 21, 2026
…ation" This reverts commit 53b9928, reversing changes made to 7936775. There shouldn't be any specific cases for MPTCP to force a connection to reset: it should behave like TCP. If not, there is a bug on the kernel side. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
lance0
added a commit
that referenced
this pull request
Apr 21, 2026
Revert "Merge pull request #67 from lance0/mptcp-close-investigation"
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 22, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 22, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 23, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 23, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 24, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 24, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 24, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 24, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 27, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 27, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 27, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 27, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 27, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
kuba-moo
pushed a commit
to linux-netdev/testing-bpf-ci
that referenced
this pull request
Apr 27, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: NipaLocal <nipa@local>
kuba-moo
pushed a commit
to linux-netdev/testing-bpf-ci
that referenced
this pull request
Apr 28, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: NipaLocal <nipa@local>
kuba-moo
pushed a commit
to linux-netdev/testing-bpf-ci
that referenced
this pull request
Apr 28, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: NipaLocal <nipa@local>
kuba-moo
pushed a commit
to linux-netdev/testing-bpf-ci
that referenced
this pull request
Apr 28, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: NipaLocal <nipa@local>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 28, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 28, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
kuba-moo
pushed a commit
to linux-netdev/testing-bpf-ci
that referenced
this pull request
Apr 28, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: NipaLocal <nipa@local>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 28, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 28, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
kuba-moo
pushed a commit
to linux-netdev/testing-bpf-ci
that referenced
this pull request
Apr 29, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 29, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp_net-next
that referenced
this pull request
Apr 29, 2026
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
mj22226
pushed a commit
to mj22226/linux
that referenced
this pull request
May 12, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
mj22226
pushed a commit
to mj22226/linux
that referenced
this pull request
May 12, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
mj22226
pushed a commit
to mj22226/linux
that referenced
this pull request
May 12, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
mj22226
pushed a commit
to mj22226/linux
that referenced
this pull request
May 12, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
mj22226
pushed a commit
to mj22226/linux
that referenced
this pull request
May 13, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
mj22226
pushed a commit
to mj22226/linux
that referenced
this pull request
May 13, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
johnny-mnemonic
pushed a commit
to linux-ia64/linux-stable-rc
that referenced
this pull request
May 14, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
woodsts
pushed a commit
to woodsts/linux-stable
that referenced
this pull request
May 14, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
woodsts
pushed a commit
to woodsts/linux-stable
that referenced
this pull request
May 14, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
woodsts
pushed a commit
to woodsts/linux-stable
that referenced
this pull request
May 14, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
daunabomba
pushed a commit
to daunabomba/linux
that referenced
this pull request
May 14, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
opsiff
pushed a commit
to deepin-community/kernel
that referenced
this pull request
May 15, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 4f269fc3c73af49aa3ee7769ab5d3e94fc7bba57) Signed-off-by: Wentao Guan <[email protected]>
opsiff
pushed a commit
to deepin-community/kernel
that referenced
this pull request
May 15, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 1d259bc7cc87494b7e757c373e955494de605d06) Signed-off-by: Wentao Guan <[email protected]>
mj22226
pushed a commit
to mj22226/linux
that referenced
this pull request
May 15, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
mj22226
pushed a commit
to mj22226/linux
that referenced
this pull request
May 15, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Whissi
pushed a commit
to Whissi/linux-stable
that referenced
this pull request
May 17, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
marcoodhb
pushed a commit
to marcoodhb/konoha-kernel-gki
that referenced
this pull request
May 22, 2026
commit f14d6e9c3678a067f304abba561e0c5446c7e845 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
opsiff
pushed a commit
to opsiff/UOS-kernel
that referenced
this pull request
May 27, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 114b4a6d4ede56b4653751aa51fe1df4028036e2) Signed-off-by: Wentao Guan <[email protected]>
opsiff
pushed a commit
to deepin-community/kernel
that referenced
this pull request
May 27, 2026
commit f14d6e9 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 114b4a6d4ede56b4653751aa51fe1df4028036e2) Signed-off-by: Wentao Guan <[email protected]>
pkking
pushed a commit
to openeuler-mirror/Intel-kernel
that referenced
this pull request
Jun 4, 2026
stable inclusion from stable-v6.6.140 commit 114b4a6d4ede56b4653751aa51fe1df4028036e2 category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=114b4a6d4ede56b4653751aa51fe1df4028036e2 -------------------------------- commit f14d6e9c3678a067f304abba561e0c5446c7e845 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Wang Hai <[email protected]>
vicamo
pushed a commit
to canonical/hwe-packages-build-helpers
that referenced
this pull request
Jun 14, 2026
BugLink: https://bugs.launchpad.net/bugs/2156549 commit f14d6e9c3678a067f304abba561e0c5446c7e845 upstream. The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Alice C. Munduruca <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
kernel-patches-daemon-bpf Bot
pushed a commit
to kernel-patches/linux-stable
that referenced
this pull request
Jun 16, 2026
[ Upstream commit f14d6e9 ] The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> [ kept `mptcp_check_readable()` name and explicit `inet_sk_state_store(sk, TCP_CLOSE)` ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
kernel-patches-daemon-bpf Bot
pushed a commit
to kernel-patches/linux-stable
that referenced
this pull request
Jun 17, 2026
[ Upstream commit f14d6e9 ] The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> [ kept `mptcp_check_readable()` name and explicit `inet_sk_state_store(sk, TCP_CLOSE)` ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
johnny-mnemonic
pushed a commit
to linux-ia64/linux-stable-rc
that referenced
this pull request
Jun 17, 2026
[ Upstream commit f14d6e9 ] The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> [ kept `mptcp_check_readable()` name and explicit `inet_sk_state_store(sk, TCP_CLOSE)` ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
kernel-patches-daemon-bpf Bot
pushed a commit
to kernel-patches/linux-stable
that referenced
this pull request
Jun 18, 2026
[ Upstream commit f14d6e9 ] The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> [ kept `mptcp_check_readable()` name and explicit `inet_sk_state_store(sk, TCP_CLOSE)` ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
kernel-patches-daemon-bpf Bot
pushed a commit
to kernel-patches/linux-stable
that referenced
this pull request
Jun 18, 2026
[ Upstream commit f14d6e9 ] The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> [ kept `mptcp_check_readable()` name and explicit `inet_sk_state_store(sk, TCP_CLOSE)` ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
kernel-patches-daemon-bpf Bot
pushed a commit
to kernel-patches/linux-stable
that referenced
this pull request
Jun 18, 2026
[ Upstream commit f14d6e9 ] The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected. To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset. Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP. Validated with MPTCP packetdrill tests [3]. Fixes: 268b123 ("mptcp: setsockopt: support SO_LINGER") [1] Fixes: d21f834 ("mptcp: use fastclose on more edge scenarios") [2] Cc: [email protected] Reported-by: Lance Tuller <[email protected]> Closes: lance0/xfr#67 Link: multipath-tcp/packetdrill#196 [3] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20260427-net-mptcp-misc-fixes-7-1-rc2-v1-3-7432b7f279fa@kernel.org Signed-off-by: Jakub Kicinski <[email protected]> [ kept `mptcp_check_readable()` name and explicit `inet_sk_state_store(sk, TCP_CLOSE)` ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the MPTCP half of #54. Previous fixes (PR #55, PR #59) addressed the stuck-write loop and SO_LINGER=0 behavior for plain TCP, but MPTCP teardown stayed graceful even with SO_LINGER set:
__mptcp_close()only routes throughmptcp_do_fastclose()when the receive queue has unread data or the linger timeout is negative, neither of which is true for a normal upload-only test that hits its deadline.Root cause (kernel-side)
SO_LINGER=0propagates to MPTCP subflows (kernel patch from April 2021), but the msk-level close path doesn't act on it directly. The supported userland mechanism for forcing MP_FASTCLOSE isconnect(fd, AF_UNSPEC)→mptcp_disconnect()→MPTCP_CF_FASTCLOSE→MP_FASTCLOSEon each subflow. There is no documentedMPTCP_FASTCLOSEsetsockopt;connect(AF_UNSPEC)is it.@matttbe (the upstream MPTCP maintainer) traced this empirically on Linux 6.17:
What this PR does
Adds three Linux-only helpers in
src/tcp.rs:is_mptcp_socket(fd)—getsockopt(IPPROTO_TCP, TCP_IS_MPTCP). Returns false on plain TCP or older kernels without the option, so the fastclose path stays a no-op.mptcp_force_fastclose(fd, stream_id)—connect(fd, AF_UNSPEC), with debug logging on failure.force_abortive_close_if_mptcp(fd, stream_id)— the dispatch helper, called from every sender teardown site.Call sites (all four sender exit paths):
send_datanormal exit (after final tcp_info + clamp)send_dataerror exit (after error-path clamp)send_data_halfnormal exit (after clamp, before returning the OwnedWriteHalf)send_data_halferror exit (after clamp)Order matters: fastclose runs after the bytes_sent clamp, because
connect(AF_UNSPEC)resets connection state which would skew any subsequenttcpi_bytes_ackedread.Also: stopped swallowing
set_lingererrors silently. They now log at debug.Why server-side receive paths are unchanged
Server's download/bidir send paths already call
send_data/send_data_halfand pick up the helper transparently. Server receive paths (receive_data/receive_data_half) deliberately don't get fastclose — once the client side issues MP_FASTCLOSE, the server sees RST or EOF and exits cleanly. Receiver-driven fastclose would just be teardown noise.Verification
Unit
force_abortive_close_if_mptcp_is_noop_on_plain_tcp) confirming the helper is a no-op on a plain TCP socket and the socket is still alive after the call.Strace (loopback)
connect(AF_UNSPEC)calls.connect(AF_UNSPEC)per stream, sequence issetsockopt(SO_LINGER) → connect(AF_UNSPEC) → close().End-to-end (matttbe's netns reproducer)
Side-by-side on
-P 4 --mptcp -t 1secin the same 2-path netem setup:The shift in packet mix (FINs → RSTs) and the collapse in post-deadline wire activity is MP_FASTCLOSE firing.
Test plan
cargo fmt --checkcargo clippy --all-features --all-targets -- -D warningscargo test --all-features(203 tests)test-mptcp-ns.sh --ci— all functional MPTCP tests still passNote
TCP_IS_MPTCPis hard-coded as43since thelibccrate doesn't expose it. Value matcheslinux-raw-sysacross all Linux architectures and the upstream UAPI header (include/uapi/linux/tcp.h).