@@ -619,6 +619,7 @@ struct sk_buff;
FN(IP_INNOROUTES) \
FN(PKT_TOO_BIG) \
FN(SOCKET_DESTROYED) \
+ FN(TCP_PAWSACTIVEREJECTED) \
FN(MAX)
/* The reason of skb drop, which is used in kfree_skb_reason().
@@ -6174,6 +6174,10 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
inet_csk_reset_xmit_timer(sk,
ICSK_TIME_RETRANS,
TCP_TIMEOUT_MIN, TCP_RTO_MAX);
+ if (after(TCP_SKB_CB(skb)->ack_seq, tp->snd_nxt))
+ SKB_DR_SET(reason, TCP_ACK_UNSENT_DATA);
+ else
+ SKB_DR_SET(reason, TCP_TOO_OLD_ACK);
goto reset_and_undo;
}
@@ -6182,6 +6186,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
tcp_time_stamp(tp))) {
NET_INC_STATS(sock_net(sk),
LINUX_MIB_PAWSACTIVEREJECTED);
+ SKB_DR_SET(reason, TCP_PAWSACTIVEREJECTED);
goto reset_and_undo;
}
@@ -6375,7 +6380,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
reset_and_undo:
tcp_clear_options(&tp->rx_opt);
tp->rx_opt.mss_clamp = saved_clamp;
- return 1;
+ return reason;
}
static void tcp_rcv_synrecv_state_fastopen(struct sock *sk)