Re: [PATCH] IPV6: inappropriate usage of inet{,6}_sk()
From: David S. Miller <hidden>
Date: 2003-10-28 09:04:18
From: David S. Miller <hidden>
Date: 2003-10-28 09:04:18
On Mon, 27 Oct 2003 23:27:00 +0900 (JST) YOSHIFUJI Hideaki / _$B5HF#1QL@ [off-list ref] wrote:
Hi,
I found other inappropriate usages of inet{,6}_sk() for
tcp_tw_bucket:
- inet6_sk(sk)->ipv6only
- inet6_sk(sk)->rcv_saddr
- inet_sk(sk)->rcv_saddr
Patch is against my previous patch.Thank you for working on a fix for this. Patch need some small fixes before I can apply it.
+static inline const struct in6_addr *__tcp_v6_rcv_saddr(const struct sock *sk)
+{
+ return likely(sk->sk_state != TCP_TIME_WAIT) ?
+ &inet6_sk(sk)->rcv_saddr : &tcptw_sk(sk)->tw_v6_rcv_saddr;
+}Cannot reference inet6_sk() or tw->tw_v6_rcv_saddr outside of CONFIG_IPV6 || CONFIG_IPV6_MODULE since these things do not exist when those configs are both disabled. Please verify the build of your new patch with IPV6 fully disabled. Thank you.