summaryrefslogtreecommitdiff
path: root/include/linux/ipv6.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-10-04 21:08:09 -0700
committerDavid S. Miller <davem@davemloft.net>2015-10-05 02:45:25 -0700
commite7eadb4de9e645e1b34539dc4128240b1e5f71dc (patch)
tree6f8ddb94fe22732cd4017724447f3cc1fca0a4f6 /include/linux/ipv6.h
parentcaf3f2676aaad395903d24a54e22f8ac4bc4823d (diff)
downloadlwn-e7eadb4de9e645e1b34539dc4128240b1e5f71dc.tar.gz
lwn-e7eadb4de9e645e1b34539dc4128240b1e5f71dc.zip
ipv6: inet6_sk() should use sk_fullsock()
SYN_RECV & TIMEWAIT sockets are not full blown, they do not have a pinet6 pointer. Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ipv6.h')
-rw-r--r--include/linux/ipv6.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index f1f32af6d9b9..0ef2a97ccdb5 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -264,9 +264,9 @@ struct tcp6_timewait_sock {
};
#if IS_ENABLED(CONFIG_IPV6)
-static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
+static inline struct ipv6_pinfo *inet6_sk(const struct sock *__sk)
{
- return inet_sk(__sk)->pinet6;
+ return sk_fullsock(__sk) ? inet_sk(__sk)->pinet6 : NULL;
}
static inline struct raw6_sock *raw6_sk(const struct sock *sk)