mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Merge 87858bbf21 ("tcp: drop secpath at the same time as we currently drop dst") into android14-6.1-lts
Steps on the way to 6.1.130 Change-Id: Ifee8efc6b60f0a702a0d7823f02da0b223d3a781 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include <net/inet_ecn.h>
|
||||
#include <net/dst.h>
|
||||
#include <net/mptcp.h>
|
||||
#include <net/xfrm.h>
|
||||
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/memcontrol.h>
|
||||
@@ -639,6 +640,19 @@ void tcp_fin(struct sock *sk);
|
||||
void tcp_check_space(struct sock *sk);
|
||||
void tcp_sack_compress_send_ack(struct sock *sk);
|
||||
|
||||
static inline void tcp_cleanup_skb(struct sk_buff *skb)
|
||||
{
|
||||
skb_dst_drop(skb);
|
||||
secpath_reset(skb);
|
||||
}
|
||||
|
||||
static inline void tcp_add_receive_queue(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
DEBUG_NET_WARN_ON_ONCE(skb_dst(skb));
|
||||
DEBUG_NET_WARN_ON_ONCE(secpath_exists(skb));
|
||||
__skb_queue_tail(&sk->sk_receive_queue, skb);
|
||||
}
|
||||
|
||||
/* tcp_timer.c */
|
||||
void tcp_init_xmit_timers(struct sock *);
|
||||
static inline void tcp_clear_xmit_timers(struct sock *sk)
|
||||
|
||||
@@ -177,7 +177,7 @@ void tcp_fastopen_add_skb(struct sock *sk, struct sk_buff *skb)
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
skb_dst_drop(skb);
|
||||
tcp_cleanup_skb(skb);
|
||||
/* segs_in has been initialized to 1 in tcp_create_openreq_child().
|
||||
* Hence, reset segs_in to 0 before calling tcp_segs_in()
|
||||
* to avoid double counting. Also, tcp_segs_in() expects
|
||||
@@ -194,7 +194,7 @@ void tcp_fastopen_add_skb(struct sock *sk, struct sk_buff *skb)
|
||||
TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_SYN;
|
||||
|
||||
tp->rcv_nxt = TCP_SKB_CB(skb)->end_seq;
|
||||
__skb_queue_tail(&sk->sk_receive_queue, skb);
|
||||
tcp_add_receive_queue(sk, skb);
|
||||
tp->syn_data_acked = 1;
|
||||
|
||||
/* u64_stats_update_begin(&tp->syncp) not needed here,
|
||||
|
||||
@@ -4836,7 +4836,7 @@ static void tcp_ofo_queue(struct sock *sk)
|
||||
tcp_rcv_nxt_update(tp, TCP_SKB_CB(skb)->end_seq);
|
||||
fin = TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN;
|
||||
if (!eaten)
|
||||
__skb_queue_tail(&sk->sk_receive_queue, skb);
|
||||
tcp_add_receive_queue(sk, skb);
|
||||
else
|
||||
kfree_skb_partial(skb, fragstolen);
|
||||
|
||||
@@ -5027,7 +5027,7 @@ static int __must_check tcp_queue_rcv(struct sock *sk, struct sk_buff *skb,
|
||||
skb, fragstolen)) ? 1 : 0;
|
||||
tcp_rcv_nxt_update(tcp_sk(sk), TCP_SKB_CB(skb)->end_seq);
|
||||
if (!eaten) {
|
||||
__skb_queue_tail(&sk->sk_receive_queue, skb);
|
||||
tcp_add_receive_queue(sk, skb);
|
||||
skb_set_owner_r(skb, sk);
|
||||
}
|
||||
return eaten;
|
||||
@@ -5110,7 +5110,7 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
|
||||
__kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
skb_dst_drop(skb);
|
||||
tcp_cleanup_skb(skb);
|
||||
__skb_pull(skb, tcp_hdr(skb)->doff * 4);
|
||||
|
||||
reason = SKB_DROP_REASON_NOT_SPECIFIED;
|
||||
@@ -6041,7 +6041,7 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb)
|
||||
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPHPHITS);
|
||||
|
||||
/* Bulk data transfer: receiver */
|
||||
skb_dst_drop(skb);
|
||||
tcp_cleanup_skb(skb);
|
||||
__skb_pull(skb, tcp_header_len);
|
||||
eaten = tcp_queue_rcv(sk, skb, &fragstolen);
|
||||
|
||||
|
||||
@@ -1791,7 +1791,7 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb,
|
||||
*/
|
||||
skb_condense(skb);
|
||||
|
||||
skb_dst_drop(skb);
|
||||
tcp_cleanup_skb(skb);
|
||||
|
||||
if (unlikely(tcp_checksum_complete(skb))) {
|
||||
bh_unlock_sock(sk);
|
||||
|
||||
Reference in New Issue
Block a user