Commit f7e4eb03 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

inet: ip early demux should avoid request sockets

When a request socket is created, we do not cache ip route
dst entry, like for timewait sockets.

Let's use sk_fullsock() helper.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d0ab253
...@@ -1518,7 +1518,7 @@ void tcp_v4_early_demux(struct sk_buff *skb) ...@@ -1518,7 +1518,7 @@ void tcp_v4_early_demux(struct sk_buff *skb)
if (sk) { if (sk) {
skb->sk = sk; skb->sk = sk;
skb->destructor = sock_edemux; skb->destructor = sock_edemux;
if (sk->sk_state != TCP_TIME_WAIT) { if (sk_fullsock(sk)) {
struct dst_entry *dst = sk->sk_rx_dst; struct dst_entry *dst = sk->sk_rx_dst;
if (dst) if (dst)
......
...@@ -1583,7 +1583,7 @@ static void tcp_v6_early_demux(struct sk_buff *skb) ...@@ -1583,7 +1583,7 @@ static void tcp_v6_early_demux(struct sk_buff *skb)
if (sk) { if (sk) {
skb->sk = sk; skb->sk = sk;
skb->destructor = sock_edemux; skb->destructor = sock_edemux;
if (sk->sk_state != TCP_TIME_WAIT) { if (sk_fullsock(sk)) {
struct dst_entry *dst = sk->sk_rx_dst; struct dst_entry *dst = sk->sk_rx_dst;
if (dst) if (dst)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment