diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 2d41d5d6ad19..5d91213d34c0 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1494,12 +1494,11 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1494 | * to destinations, already remembered | 1494 | * to destinations, already remembered |
1495 | * to the moment of synflood. | 1495 | * to the moment of synflood. |
1496 | */ | 1496 | */ |
1497 | NETDEBUG(if (net_ratelimit()) \ | 1497 | LIMIT_NETDEBUG(printk(KERN_DEBUG "TCP: drop open " |
1498 | printk(KERN_DEBUG "TCP: drop open " | 1498 | "request from %u.%u." |
1499 | "request from %u.%u." | 1499 | "%u.%u/%u\n", |
1500 | "%u.%u/%u\n", \ | 1500 | NIPQUAD(saddr), |
1501 | NIPQUAD(saddr), | 1501 | ntohs(skb->h.th->source))); |
1502 | ntohs(skb->h.th->source))); | ||
1503 | dst_release(dst); | 1502 | dst_release(dst); |
1504 | goto drop_and_free; | 1503 | goto drop_and_free; |
1505 | } | 1504 | } |
@@ -1627,8 +1626,7 @@ static int tcp_v4_checksum_init(struct sk_buff *skb) | |||
1627 | skb->nh.iph->daddr, skb->csum)) | 1626 | skb->nh.iph->daddr, skb->csum)) |
1628 | return 0; | 1627 | return 0; |
1629 | 1628 | ||
1630 | NETDEBUG(if (net_ratelimit()) | 1629 | LIMIT_NETDEBUG(printk(KERN_DEBUG "hw tcp v4 csum failed\n")); |
1631 | printk(KERN_DEBUG "hw tcp v4 csum failed\n")); | ||
1632 | skb->ip_summed = CHECKSUM_NONE; | 1630 | skb->ip_summed = CHECKSUM_NONE; |
1633 | } | 1631 | } |
1634 | if (skb->len <= 76) { | 1632 | if (skb->len <= 76) { |
@@ -2045,9 +2043,10 @@ static int tcp_v4_init_sock(struct sock *sk) | |||
2045 | */ | 2043 | */ |
2046 | tp->snd_ssthresh = 0x7fffffff; /* Infinity */ | 2044 | tp->snd_ssthresh = 0x7fffffff; /* Infinity */ |
2047 | tp->snd_cwnd_clamp = ~0; | 2045 | tp->snd_cwnd_clamp = ~0; |
2048 | tp->mss_cache_std = tp->mss_cache = 536; | 2046 | tp->mss_cache = 536; |
2049 | 2047 | ||
2050 | tp->reordering = sysctl_tcp_reordering; | 2048 | tp->reordering = sysctl_tcp_reordering; |
2049 | tp->ca_ops = &tcp_init_congestion_ops; | ||
2051 | 2050 | ||
2052 | sk->sk_state = TCP_CLOSE; | 2051 | sk->sk_state = TCP_CLOSE; |
2053 | 2052 | ||
@@ -2070,6 +2069,8 @@ int tcp_v4_destroy_sock(struct sock *sk) | |||
2070 | 2069 | ||
2071 | tcp_clear_xmit_timers(sk); | 2070 | tcp_clear_xmit_timers(sk); |
2072 | 2071 | ||
2072 | tcp_cleanup_congestion_control(tp); | ||
2073 | |||
2073 | /* Cleanup up the write buffer. */ | 2074 | /* Cleanup up the write buffer. */ |
2074 | sk_stream_writequeue_purge(sk); | 2075 | sk_stream_writequeue_purge(sk); |
2075 | 2076 | ||