Commit 510fd263 authored by Dennis Dast's avatar Dennis Dast Committed by Treehugger Robot
Browse files

ANDROID: fix missing ACK from netns in TIME_WAIT state



When merging 5.15.113 into android13-5.15-lts the following merge
conflict occurred in net/ipv4/tcp_ipv4.c in the function
tcp_v4_send_ack:

    <<<<<<< commit a7bab7e4 ("ANDROID: GKI: fix up mhi.ko build location.")
           ctl_sk->sk_mark = 0;
    ||||||| commit 9d6bde85 ("Linux 5.15.112")
           ctl_sk->sk_mark = 0;
           sock_net_set(ctl_sk, &init_net);
    =======
           sock_net_set(ctl_sk, &init_net);
    >>>>>>> commit 1fe619a7 ("Linux 5.15.113")

This was resolved by taking over the implementation from upstream
commit 1fe619a7 ("Linux 5.15.113"), i.e.:

    sock_net_set(ctl_sk, &init_net);

However, the call to sock_net_set() should not be used here since the
commit that introduced it has been reverted in the android13-5.15 branch
(3905e9a3 Revert "ipv4/tcp: do not use per netns ctl sockets").
Therefore, this line should be removed.

Having the call to sock_net_set() lead to the following misbehaviour.
It was observed that a TCP/IPv4 client connection from within a network
namespace does sometimes not properly close the connection.  If the
client initiates the connection closure the FIN/ACK from the server is
sometimes not ACKed which leaves the server in the LAST_ACK state.
After applying this patch this misbehaviour is no longer observed.

Fixes: a2a0479a ("Merge 5.15.113 into android13-5.15-lts")
Change-Id: I63804163bfb98031bdf499c05370e9ba3a419d19
Signed-off-by: default avatarDennis Dast <dennis.dast@proofnet.de>
parent 8b83b87a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment