|
@@ -2592,6 +2592,7 @@ int tcp_connect(struct sock *sk)
|
|
|
{
|
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
|
struct sk_buff *buff;
|
|
|
+ int err;
|
|
|
|
|
|
tcp_connect_init(sk);
|
|
|
|
|
@@ -2614,7 +2615,9 @@ int tcp_connect(struct sock *sk)
|
|
|
sk->sk_wmem_queued += buff->truesize;
|
|
|
sk_mem_charge(sk, buff->truesize);
|
|
|
tp->packets_out += tcp_skb_pcount(buff);
|
|
|
- tcp_transmit_skb(sk, buff, 1, sk->sk_allocation);
|
|
|
+ err = tcp_transmit_skb(sk, buff, 1, sk->sk_allocation);
|
|
|
+ if (err == -ECONNREFUSED)
|
|
|
+ return err;
|
|
|
|
|
|
/* We change tp->snd_nxt after the tcp_transmit_skb() call
|
|
|
* in order to make this packet get counted in tcpOutSegs.
|