aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-01-31 08:05:50 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-31 22:28:18 -0500
commit941b1d22cc035ad58b3d9b44a1c74efac2d7e499 (patch)
tree9b50211c27a209c02d97b73f74bf33cc87f4c9c3 /include
parent5ee31fc1ecdcbc234c8c56dcacef87c8e09909d8 (diff)
[NETNS]: Make bind buckets live in net namespaces.
This tags the inet_bind_bucket struct with net pointer, initializes it during creation and makes a filtering during lookup. A better hashfn, that takes the net into account is to be done in the future, but currently all bind buckets with similar port will be in one hash chain. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/inet_hashtables.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index a34a8f25fc57..55532b9bb59a 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -74,6 +74,7 @@ struct inet_ehash_bucket {
74 * ports are created in O(1) time? I thought so. ;-) -DaveM 74 * ports are created in O(1) time? I thought so. ;-) -DaveM
75 */ 75 */
76struct inet_bind_bucket { 76struct inet_bind_bucket {
77 struct net *ib_net;
77 unsigned short port; 78 unsigned short port;
78 signed short fastreuse; 79 signed short fastreuse;
79 struct hlist_node node; 80 struct hlist_node node;
@@ -194,6 +195,7 @@ static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo)
194 195
195extern struct inet_bind_bucket * 196extern struct inet_bind_bucket *
196 inet_bind_bucket_create(struct kmem_cache *cachep, 197 inet_bind_bucket_create(struct kmem_cache *cachep,
198 struct net *net,
197 struct inet_bind_hashbucket *head, 199 struct inet_bind_hashbucket *head,
198 const unsigned short snum); 200 const unsigned short snum);
199extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, 201extern void inet_bind_bucket_destroy(struct kmem_cache *cachep,