diff options
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r-- | net/dccp/ipv4.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 40fe6afacde6..ae088d1347af 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -62,27 +62,27 @@ static int __dccp_v4_check_established(struct sock *sk, const __u16 lport, | |||
62 | const int dif = sk->sk_bound_dev_if; | 62 | const int dif = sk->sk_bound_dev_if; |
63 | INET_ADDR_COOKIE(acookie, saddr, daddr) | 63 | INET_ADDR_COOKIE(acookie, saddr, daddr) |
64 | const __u32 ports = INET_COMBINED_PORTS(inet->dport, lport); | 64 | const __u32 ports = INET_COMBINED_PORTS(inet->dport, lport); |
65 | const int hash = inet_ehashfn(daddr, lport, saddr, inet->dport, | 65 | unsigned int hash = inet_ehashfn(daddr, lport, saddr, inet->dport); |
66 | dccp_hashinfo.ehash_size); | 66 | struct inet_ehash_bucket *head = inet_ehash_bucket(&dccp_hashinfo, hash); |
67 | struct inet_ehash_bucket *head = &dccp_hashinfo.ehash[hash]; | ||
68 | const struct sock *sk2; | 67 | const struct sock *sk2; |
69 | const struct hlist_node *node; | 68 | const struct hlist_node *node; |
70 | struct inet_timewait_sock *tw; | 69 | struct inet_timewait_sock *tw; |
71 | 70 | ||
71 | prefetch(head->chain.first); | ||
72 | write_lock(&head->lock); | 72 | write_lock(&head->lock); |
73 | 73 | ||
74 | /* Check TIME-WAIT sockets first. */ | 74 | /* Check TIME-WAIT sockets first. */ |
75 | sk_for_each(sk2, node, &(head + dccp_hashinfo.ehash_size)->chain) { | 75 | sk_for_each(sk2, node, &(head + dccp_hashinfo.ehash_size)->chain) { |
76 | tw = inet_twsk(sk2); | 76 | tw = inet_twsk(sk2); |
77 | 77 | ||
78 | if (INET_TW_MATCH(sk2, acookie, saddr, daddr, ports, dif)) | 78 | if (INET_TW_MATCH(sk2, hash, acookie, saddr, daddr, ports, dif)) |
79 | goto not_unique; | 79 | goto not_unique; |
80 | } | 80 | } |
81 | tw = NULL; | 81 | tw = NULL; |
82 | 82 | ||
83 | /* And established part... */ | 83 | /* And established part... */ |
84 | sk_for_each(sk2, node, &head->chain) { | 84 | sk_for_each(sk2, node, &head->chain) { |
85 | if (INET_MATCH(sk2, acookie, saddr, daddr, ports, dif)) | 85 | if (INET_MATCH(sk2, hash, acookie, saddr, daddr, ports, dif)) |
86 | goto not_unique; | 86 | goto not_unique; |
87 | } | 87 | } |
88 | 88 | ||
@@ -90,7 +90,7 @@ static int __dccp_v4_check_established(struct sock *sk, const __u16 lport, | |||
90 | * in hash table socket with a funny identity. */ | 90 | * in hash table socket with a funny identity. */ |
91 | inet->num = lport; | 91 | inet->num = lport; |
92 | inet->sport = htons(lport); | 92 | inet->sport = htons(lport); |
93 | sk->sk_hashent = hash; | 93 | sk->sk_hash = hash; |
94 | BUG_TRAP(sk_unhashed(sk)); | 94 | BUG_TRAP(sk_unhashed(sk)); |
95 | __sk_add_node(sk, &head->chain); | 95 | __sk_add_node(sk, &head->chain); |
96 | sock_prot_inc_use(sk->sk_prot); | 96 | sock_prot_inc_use(sk->sk_prot); |