Message ID | 20241015102940.26157-36-chia-yu.chang@nokia-bell-labs.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | DualPI2, Accurate ECN, TCP Prague patch series | expand |
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 12e975ed4910..cf9491253ca3 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -906,10 +906,12 @@ static void syn_ack_recalc(struct request_sock *req, int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req) { - int err = req->rsk_ops->rtx_syn_ack(parent, req); + int err; - if (!err) - req->num_retrans++; + req->num_retrans++; + err = req->rsk_ops->rtx_syn_ack(parent, req); + if (err) + req->num_retrans--; return err; } EXPORT_SYMBOL(inet_rtx_syn_ack);