diff options
Diffstat (limited to 'net/ipv6/inet6_hashtables.c')
| -rw-r--r-- | net/ipv6/inet6_hashtables.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index 2ae84c961678..8accd1fbeeda 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | * 2 of the License, or (at your option) any later version. | 14 | * 2 of the License, or (at your option) any later version. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include <linux/config.h> | ||
| 18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 19 | #include <linux/random.h> | 18 | #include <linux/random.h> |
| 20 | 19 | ||
| @@ -65,7 +64,7 @@ struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo, | |||
| 65 | { | 64 | { |
| 66 | struct sock *sk; | 65 | struct sock *sk; |
| 67 | const struct hlist_node *node; | 66 | const struct hlist_node *node; |
| 68 | const __u32 ports = INET_COMBINED_PORTS(sport, hnum); | 67 | const __portpair ports = INET_COMBINED_PORTS(sport, hnum); |
| 69 | /* Optimize here for direct hit, only listening connections can | 68 | /* Optimize here for direct hit, only listening connections can |
| 70 | * have wildcards anyways. | 69 | * have wildcards anyways. |
| 71 | */ | 70 | */ |
| @@ -83,7 +82,7 @@ struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo, | |||
| 83 | sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) { | 82 | sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) { |
| 84 | const struct inet_timewait_sock *tw = inet_twsk(sk); | 83 | const struct inet_timewait_sock *tw = inet_twsk(sk); |
| 85 | 84 | ||
| 86 | if(*((__u32 *)&(tw->tw_dport)) == ports && | 85 | if(*((__portpair *)&(tw->tw_dport)) == ports && |
| 87 | sk->sk_family == PF_INET6) { | 86 | sk->sk_family == PF_INET6) { |
| 88 | const struct inet6_timewait_sock *tw6 = inet6_twsk(sk); | 87 | const struct inet6_timewait_sock *tw6 = inet6_twsk(sk); |
| 89 | 88 | ||
| @@ -172,7 +171,7 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, | |||
| 172 | const struct in6_addr *daddr = &np->rcv_saddr; | 171 | const struct in6_addr *daddr = &np->rcv_saddr; |
| 173 | const struct in6_addr *saddr = &np->daddr; | 172 | const struct in6_addr *saddr = &np->daddr; |
| 174 | const int dif = sk->sk_bound_dev_if; | 173 | const int dif = sk->sk_bound_dev_if; |
| 175 | const u32 ports = INET_COMBINED_PORTS(inet->dport, lport); | 174 | const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport); |
| 176 | const unsigned int hash = inet6_ehashfn(daddr, inet->num, saddr, | 175 | const unsigned int hash = inet6_ehashfn(daddr, inet->num, saddr, |
| 177 | inet->dport); | 176 | inet->dport); |
| 178 | struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); | 177 | struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); |
| @@ -189,7 +188,7 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, | |||
| 189 | 188 | ||
| 190 | tw = inet_twsk(sk2); | 189 | tw = inet_twsk(sk2); |
| 191 | 190 | ||
| 192 | if(*((__u32 *)&(tw->tw_dport)) == ports && | 191 | if(*((__portpair *)&(tw->tw_dport)) == ports && |
| 193 | sk2->sk_family == PF_INET6 && | 192 | sk2->sk_family == PF_INET6 && |
| 194 | ipv6_addr_equal(&tw6->tw_v6_daddr, saddr) && | 193 | ipv6_addr_equal(&tw6->tw_v6_daddr, saddr) && |
| 195 | ipv6_addr_equal(&tw6->tw_v6_rcv_saddr, daddr) && | 194 | ipv6_addr_equal(&tw6->tw_v6_rcv_saddr, daddr) && |
