]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv4/tcp_output.c
tcp: unify tcp_v4_rtx_synack and tcp_v6_rtx_synack
[karo-tx-linux.git] / net / ipv4 / tcp_output.c
index d92bce0ea24ec54fb559941979906337d68881ad..f8f2a944a1ce091f216d7ca7968667419fe6ed0a 100644 (file)
@@ -3299,3 +3299,18 @@ void tcp_send_probe0(struct sock *sk)
                                          TCP_RTO_MAX);
        }
 }
+
+int tcp_rtx_synack(struct sock *sk, struct request_sock *req)
+{
+       const struct tcp_request_sock_ops *af_ops = tcp_rsk(req)->af_specific;
+       struct flowi fl;
+       int res;
+
+       res = af_ops->send_synack(sk, NULL, &fl, req, 0, NULL);
+       if (!res) {
+               TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_RETRANSSEGS);
+               NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSYNRETRANS);
+       }
+       return res;
+}
+EXPORT_SYMBOL(tcp_rtx_synack);