net: ipv6: fix TCP early demux
IPv6 needs a cookie in dst_check() call. We need to add rx_dst_cookie and provide a family independent sk_rx_dst_set(sk, skb) method to properly support IPv6 TCP early demux. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
b5497eeb37
commit
5d299f3d3c
@@ -5392,6 +5392,8 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
|
||||
{
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
|
||||
if (unlikely(sk->sk_rx_dst == NULL))
|
||||
inet_csk(sk)->icsk_af_ops->sk_rx_dst_set(sk, skb);
|
||||
/*
|
||||
* Header prediction.
|
||||
* The code loosely follows the one in the famous
|
||||
@@ -5605,7 +5607,7 @@ void tcp_finish_connect(struct sock *sk, struct sk_buff *skb)
|
||||
tcp_set_state(sk, TCP_ESTABLISHED);
|
||||
|
||||
if (skb != NULL) {
|
||||
inet_sk_rx_dst_set(sk, skb);
|
||||
icsk->icsk_af_ops->sk_rx_dst_set(sk, skb);
|
||||
security_inet_conn_established(sk, skb);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user