aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_timewait_sock.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 23:10:42 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:43:19 -0400
commit463c84b97f24010a67cd871746d6a7e4c925a5f9 (patch)
tree48df67ede4ebb5d12b3c0ae55d72531574bd51a6 /net/ipv4/inet_timewait_sock.c
parent87d11ceb9deb7a3f13fdee6e89d9bb6be7d27a71 (diff)
[NET]: Introduce inet_connection_sock
This creates struct inet_connection_sock, moving members out of struct tcp_sock that are shareable with other INET connection oriented protocols, such as DCCP, that in my private tree already uses most of these members. The functions that operate on these members were renamed, using a inet_csk_ prefix while not being moved yet to a new file, so as to ease the review of these changes. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_timewait_sock.c')
-rw-r--r--net/ipv4/inet_timewait_sock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index ceb577c74237..5cba59b869fe 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -56,6 +56,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
56 struct inet_hashinfo *hashinfo) 56 struct inet_hashinfo *hashinfo)
57{ 57{
58 const struct inet_sock *inet = inet_sk(sk); 58 const struct inet_sock *inet = inet_sk(sk);
59 const struct inet_connection_sock *icsk = inet_csk(sk);
59 struct inet_ehash_bucket *ehead = &hashinfo->ehash[sk->sk_hashent]; 60 struct inet_ehash_bucket *ehead = &hashinfo->ehash[sk->sk_hashent];
60 struct inet_bind_hashbucket *bhead; 61 struct inet_bind_hashbucket *bhead;
61 /* Step 1: Put TW into bind hash. Original socket stays there too. 62 /* Step 1: Put TW into bind hash. Original socket stays there too.
@@ -64,8 +65,8 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
64 */ 65 */
65 bhead = &hashinfo->bhash[inet_bhashfn(inet->num, hashinfo->bhash_size)]; 66 bhead = &hashinfo->bhash[inet_bhashfn(inet->num, hashinfo->bhash_size)];
66 spin_lock(&bhead->lock); 67 spin_lock(&bhead->lock);
67 tw->tw_tb = inet->bind_hash; 68 tw->tw_tb = icsk->icsk_bind_hash;
68 BUG_TRAP(inet->bind_hash); 69 BUG_TRAP(icsk->icsk_bind_hash);
69 inet_twsk_add_bind_node(tw, &tw->tw_tb->owners); 70 inet_twsk_add_bind_node(tw, &tw->tw_tb->owners);
70 spin_unlock(&bhead->lock); 71 spin_unlock(&bhead->lock);
71 72