diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-12-14 02:23:09 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-03 16:10:47 -0500 |
commit | 0fa1a53e1f055a6c790f40e7728f42a825b29248 (patch) | |
tree | 524eb8c8cadf6053faad6c8799c0571dee92c2b1 /include/net | |
parent | b9750ce13c08aa8a71a9b138d741f3046aefd991 (diff) |
[IPV6]: Introduce inet6_timewait_sock
Out of tcp6_timewait_sock, that now is just an aggregation of
inet_timewait_sock and inet6_timewait_sock, using tw_ipv6_offset in struct
inet_timewait_sock, that is common to the IPv6 transport protocols that use
timewait sockets, like DCCP and TCP.
tw_ipv6_offset plays the struct inet_sock pinfo6 role, i.e. for the generic
code to find the IPv6 area in a timewait sock.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/inet6_hashtables.h | 6 | ||||
-rw-r--r-- | include/net/inet_timewait_sock.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index a4a204f99ea6..25f708ff020e 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -110,10 +110,10 @@ static inline struct sock * | |||
110 | 110 | ||
111 | if(*((__u32 *)&(tw->tw_dport)) == ports && | 111 | if(*((__u32 *)&(tw->tw_dport)) == ports && |
112 | sk->sk_family == PF_INET6) { | 112 | sk->sk_family == PF_INET6) { |
113 | const struct tcp6_timewait_sock *tcp6tw = tcp6_twsk(sk); | 113 | const struct inet6_timewait_sock *tw6 = inet6_twsk(sk); |
114 | 114 | ||
115 | if (ipv6_addr_equal(&tcp6tw->tw_v6_daddr, saddr) && | 115 | if (ipv6_addr_equal(&tw6->tw_v6_daddr, saddr) && |
116 | ipv6_addr_equal(&tcp6tw->tw_v6_rcv_saddr, daddr) && | 116 | ipv6_addr_equal(&tw6->tw_v6_rcv_saddr, daddr) && |
117 | (!sk->sk_bound_dev_if || sk->sk_bound_dev_if == dif)) | 117 | (!sk->sk_bound_dev_if || sk->sk_bound_dev_if == dif)) |
118 | goto hit; | 118 | goto hit; |
119 | } | 119 | } |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 28f7b2103505..ca240f856c46 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -127,7 +127,8 @@ struct inet_timewait_sock { | |||
127 | __u16 tw_num; | 127 | __u16 tw_num; |
128 | /* And these are ours. */ | 128 | /* And these are ours. */ |
129 | __u8 tw_ipv6only:1; | 129 | __u8 tw_ipv6only:1; |
130 | /* 31 bits hole, try to pack */ | 130 | /* 15 bits hole, try to pack */ |
131 | __u16 tw_ipv6_offset; | ||
131 | int tw_timeout; | 132 | int tw_timeout; |
132 | unsigned long tw_ttd; | 133 | unsigned long tw_ttd; |
133 | struct inet_bind_bucket *tw_tb; | 134 | struct inet_bind_bucket *tw_tb; |