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

Commit d5dd1919 authored by Eric Dumazet's avatar Eric Dumazet Committed by Subash Abhinov Kasiviswanathan
Browse files

tcp: call tcp_drop() from tcp_data_queue_ofo()



[ Upstream commit 8541b21e ]

In order to be able to give better diagnostics and detect
malicious traffic, we need to have better sk->sk_drops tracking.

CRs-Fixed: 2290234
Change-Id: I30e42f7d5bf60b5aeffd26bff3ff628831b09744
Fixes: 9f5afeae ("tcp: use an RB tree for ooo receive queue")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
Acked-by: default avatarYuchung Cheng <ycheng@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Git-commit: 9933832d
Git-repo: https://android.googlesource.com/kernel/common/


Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent dcca4c79
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4483,7 +4483,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
				/* All the bits are present. Drop. */
				NET_INC_STATS(sock_net(sk),
					      LINUX_MIB_TCPOFOMERGE);
				__kfree_skb(skb);
				tcp_drop(sk, skb);
				skb = NULL;
				tcp_dsack_set(sk, seq, end_seq);
				goto add_sack;
@@ -4502,7 +4502,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
						 TCP_SKB_CB(skb1)->end_seq);
				NET_INC_STATS(sock_net(sk),
					      LINUX_MIB_TCPOFOMERGE);
				__kfree_skb(skb1);
				tcp_drop(sk, skb1);
				goto merge_right;
			}
		} else if (tcp_try_coalesce(sk, OOO_QUEUE, skb1,