aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-08-06 04:40:21 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-15 01:44:12 -0400
commit4cdadcbcb64bdf3ae8bdf3ef5bb2b91c85444cfa (patch)
treefc6fd317dd6e128f176101c5843f58ed8ab86c9c /include/net/sctp/sctp.h
parentf1f4376307ca45558eb22487022aefceed7385e8 (diff)
sctp: Make the endpoint hashtable handle multiple network namespaces
- Use struct net in the hash calculation - Use sock_net(endpoint.base.sk) in the endpoint lookups. - On receive calculate the network namespace from skb->dev. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp/sctp.h')
-rw-r--r--include/net/sctp/sctp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 7c0504034583..87b119f74c4a 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -638,9 +638,9 @@ static inline int sctp_phashfn(struct net *net, __u16 lport)
638} 638}
639 639
640/* This is the hash function for the endpoint hash table. */ 640/* This is the hash function for the endpoint hash table. */
641static inline int sctp_ep_hashfn(__u16 lport) 641static inline int sctp_ep_hashfn(struct net *net, __u16 lport)
642{ 642{
643 return lport & (sctp_ep_hashsize - 1); 643 return (net_hash_mix(net) + lport) & (sctp_ep_hashsize - 1);
644} 644}
645 645
646/* This is the hash function for the association hash table. */ 646/* This is the hash function for the association hash table. */