aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index d7a884c534a..7d4648f8b3d 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2042,7 +2042,7 @@ int tcp_disconnect(struct sock *sk, int flags)
2042 __skb_queue_purge(&sk->sk_async_wait_queue); 2042 __skb_queue_purge(&sk->sk_async_wait_queue);
2043#endif 2043#endif
2044 2044
2045 inet->dport = 0; 2045 inet->inet_dport = 0;
2046 2046
2047 if (!(sk->sk_userlocks & SOCK_BINDADDR_LOCK)) 2047 if (!(sk->sk_userlocks & SOCK_BINDADDR_LOCK))
2048 inet_reset_saddr(sk); 2048 inet_reset_saddr(sk);
@@ -2067,7 +2067,7 @@ int tcp_disconnect(struct sock *sk, int flags)
2067 memset(&tp->rx_opt, 0, sizeof(tp->rx_opt)); 2067 memset(&tp->rx_opt, 0, sizeof(tp->rx_opt));
2068 __sk_dst_reset(sk); 2068 __sk_dst_reset(sk);
2069 2069
2070 WARN_ON(inet->num && !icsk->icsk_bind_hash); 2070 WARN_ON(inet->inet_num && !icsk->icsk_bind_hash);
2071 2071
2072 sk->sk_error_report(sk); 2072 sk->sk_error_report(sk);
2073 return err; 2073 return err;
@@ -2904,11 +2904,10 @@ void __init tcp_init(void)
2904 (totalram_pages >= 128 * 1024) ? 2904 (totalram_pages >= 128 * 1024) ?
2905 13 : 15, 2905 13 : 15,
2906 0, 2906 0,
2907 &tcp_hashinfo.ehash_size,
2908 NULL, 2907 NULL,
2908 &tcp_hashinfo.ehash_mask,
2909 thash_entries ? 0 : 512 * 1024); 2909 thash_entries ? 0 : 512 * 1024);
2910 tcp_hashinfo.ehash_size = 1 << tcp_hashinfo.ehash_size; 2910 for (i = 0; i <= tcp_hashinfo.ehash_mask; i++) {
2911 for (i = 0; i < tcp_hashinfo.ehash_size; i++) {
2912 INIT_HLIST_NULLS_HEAD(&tcp_hashinfo.ehash[i].chain, i); 2911 INIT_HLIST_NULLS_HEAD(&tcp_hashinfo.ehash[i].chain, i);
2913 INIT_HLIST_NULLS_HEAD(&tcp_hashinfo.ehash[i].twchain, i); 2912 INIT_HLIST_NULLS_HEAD(&tcp_hashinfo.ehash[i].twchain, i);
2914 } 2913 }
@@ -2917,7 +2916,7 @@ void __init tcp_init(void)
2917 tcp_hashinfo.bhash = 2916 tcp_hashinfo.bhash =
2918 alloc_large_system_hash("TCP bind", 2917 alloc_large_system_hash("TCP bind",
2919 sizeof(struct inet_bind_hashbucket), 2918 sizeof(struct inet_bind_hashbucket),
2920 tcp_hashinfo.ehash_size, 2919 tcp_hashinfo.ehash_mask + 1,
2921 (totalram_pages >= 128 * 1024) ? 2920 (totalram_pages >= 128 * 1024) ?
2922 13 : 15, 2921 13 : 15,
2923 0, 2922 0,
@@ -2972,8 +2971,8 @@ void __init tcp_init(void)
2972 sysctl_tcp_rmem[2] = max(87380, max_share); 2971 sysctl_tcp_rmem[2] = max(87380, max_share);
2973 2972
2974 printk(KERN_INFO "TCP: Hash tables configured " 2973 printk(KERN_INFO "TCP: Hash tables configured "
2975 "(established %d bind %d)\n", 2974 "(established %u bind %u)\n",
2976 tcp_hashinfo.ehash_size, tcp_hashinfo.bhash_size); 2975 tcp_hashinfo.ehash_mask + 1, tcp_hashinfo.bhash_size);
2977 2976
2978 tcp_register_congestion_control(&tcp_reno); 2977 tcp_register_congestion_control(&tcp_reno);
2979} 2978}