diff options
Diffstat (limited to 'net/ipv6/inet6_connection_sock.c')
-rw-r--r-- | net/ipv6/inet6_connection_sock.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 827f41d1478b..c700302ad51a 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
@@ -52,20 +52,20 @@ EXPORT_SYMBOL_GPL(inet6_csk_bind_conflict); | |||
52 | /* | 52 | /* |
53 | * request_sock (formerly open request) hash tables. | 53 | * request_sock (formerly open request) hash tables. |
54 | */ | 54 | */ |
55 | static u32 inet6_synq_hash(const struct in6_addr *raddr, const u16 rport, | 55 | static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport, |
56 | const u32 rnd, const u16 synq_hsize) | 56 | const u32 rnd, const u16 synq_hsize) |
57 | { | 57 | { |
58 | u32 a = raddr->s6_addr32[0]; | 58 | u32 a = (__force u32)raddr->s6_addr32[0]; |
59 | u32 b = raddr->s6_addr32[1]; | 59 | u32 b = (__force u32)raddr->s6_addr32[1]; |
60 | u32 c = raddr->s6_addr32[2]; | 60 | u32 c = (__force u32)raddr->s6_addr32[2]; |
61 | 61 | ||
62 | a += JHASH_GOLDEN_RATIO; | 62 | a += JHASH_GOLDEN_RATIO; |
63 | b += JHASH_GOLDEN_RATIO; | 63 | b += JHASH_GOLDEN_RATIO; |
64 | c += rnd; | 64 | c += rnd; |
65 | __jhash_mix(a, b, c); | 65 | __jhash_mix(a, b, c); |
66 | 66 | ||
67 | a += raddr->s6_addr32[3]; | 67 | a += (__force u32)raddr->s6_addr32[3]; |
68 | b += (u32)rport; | 68 | b += (__force u32)rport; |
69 | __jhash_mix(a, b, c); | 69 | __jhash_mix(a, b, c); |
70 | 70 | ||
71 | return c & (synq_hsize - 1); | 71 | return c & (synq_hsize - 1); |
@@ -73,7 +73,7 @@ static u32 inet6_synq_hash(const struct in6_addr *raddr, const u16 rport, | |||
73 | 73 | ||
74 | struct request_sock *inet6_csk_search_req(const struct sock *sk, | 74 | struct request_sock *inet6_csk_search_req(const struct sock *sk, |
75 | struct request_sock ***prevp, | 75 | struct request_sock ***prevp, |
76 | const __u16 rport, | 76 | const __be16 rport, |
77 | const struct in6_addr *raddr, | 77 | const struct in6_addr *raddr, |
78 | const struct in6_addr *laddr, | 78 | const struct in6_addr *laddr, |
79 | const int iif) | 79 | const int iif) |
@@ -139,9 +139,8 @@ void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr * uaddr) | |||
139 | 139 | ||
140 | EXPORT_SYMBOL_GPL(inet6_csk_addr2sockaddr); | 140 | EXPORT_SYMBOL_GPL(inet6_csk_addr2sockaddr); |
141 | 141 | ||
142 | int inet6_csk_xmit(struct sk_buff *skb, int ipfragok) | 142 | int inet6_csk_xmit(struct sk_buff *skb, struct sock *sk, int ipfragok) |
143 | { | 143 | { |
144 | struct sock *sk = skb->sk; | ||
145 | struct inet_sock *inet = inet_sk(sk); | 144 | struct inet_sock *inet = inet_sk(sk); |
146 | struct ipv6_pinfo *np = inet6_sk(sk); | 145 | struct ipv6_pinfo *np = inet6_sk(sk); |
147 | struct flowi fl; | 146 | struct flowi fl; |