diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/inet6_hashtables.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index 62a5b691858e..72f13a9928e4 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -28,7 +28,8 @@ | |||
28 | struct inet_hashinfo; | 28 | struct inet_hashinfo; |
29 | 29 | ||
30 | /* I have no idea if this is a good hash for v6 or not. -DaveM */ | 30 | /* I have no idea if this is a good hash for v6 or not. -DaveM */ |
31 | static inline unsigned int inet6_ehashfn(const struct in6_addr *laddr, const u16 lport, | 31 | static inline unsigned int inet6_ehashfn(struct net *net, |
32 | const struct in6_addr *laddr, const u16 lport, | ||
32 | const struct in6_addr *faddr, const __be16 fport) | 33 | const struct in6_addr *faddr, const __be16 fport) |
33 | { | 34 | { |
34 | u32 ports = (lport ^ (__force u16)fport); | 35 | u32 ports = (lport ^ (__force u16)fport); |
@@ -46,7 +47,9 @@ static inline int inet6_sk_ehashfn(const struct sock *sk) | |||
46 | const struct in6_addr *faddr = &np->daddr; | 47 | const struct in6_addr *faddr = &np->daddr; |
47 | const __u16 lport = inet->num; | 48 | const __u16 lport = inet->num; |
48 | const __be16 fport = inet->dport; | 49 | const __be16 fport = inet->dport; |
49 | return inet6_ehashfn(laddr, lport, faddr, fport); | 50 | struct net *net = sock_net(sk); |
51 | |||
52 | return inet6_ehashfn(net, laddr, lport, faddr, fport); | ||
50 | } | 53 | } |
51 | 54 | ||
52 | extern void __inet6_hash(struct sock *sk); | 55 | extern void __inet6_hash(struct sock *sk); |