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:
Dennis Dast <dennis.dast@proofnet.de>
Loading
Please sign in to comment