Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7eadb4d authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

ipv6: inet6_sk() should use sk_fullsock()



SYN_RECV & TIMEWAIT sockets are not full blown, they do not have a pinet6
pointer.

Fixes: ca6fb065 ("tcp: attach SYNACK messages to request sockets instead of listener")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent caf3f267
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -266,7 +266,7 @@ struct tcp6_timewait_sock {
#if IS_ENABLED(CONFIG_IPV6)
#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)
static inline struct raw6_sock *raw6_sk(const struct sock *sk)