Skip to content

Commit 2da51d3

Browse files
committed
tcp: rstreason: fully support in tcp_rcv_state_process()
JIRA: https://issues.redhat.com/browse/RHEL-48648 Upstream Status: linux.git commit f6d5e2c Author: Jason Xing <kernelxing@tencent.com> Date: Fri May 10 20:25:00 2024 +0800 tcp: rstreason: fully support in tcp_rcv_state_process() Like the previous patch does in this series, finish the conversion map is enough to let rstreason mechanism work in this function. Signed-off-by: Jason Xing <kernelxing@tencent.com> Link: https://lore.kernel.org/r/20240510122502.27850-4-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Antoine Tenart <atenart@redhat.com>
1 parent 0020c09 commit 2da51d3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

include/net/rstreason.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
FN(TCP_RFC7323_PAWS) \
1313
FN(TCP_TOO_OLD_ACK) \
1414
FN(TCP_ACK_UNSENT_DATA) \
15+
FN(TCP_FLAGS) \
16+
FN(TCP_OLD_ACK) \
17+
FN(TCP_ABORT_ON_DATA) \
1518
FN(MPTCP_RST_EUNSPEC) \
1619
FN(MPTCP_RST_EMPTCP) \
1720
FN(MPTCP_RST_ERESOURCE) \
@@ -59,6 +62,15 @@ enum sk_rst_reason {
5962
* sent yet
6063
*/
6164
SK_RST_REASON_TCP_ACK_UNSENT_DATA,
65+
/** @SK_RST_REASON_TCP_FLAGS: TCP flags invalid */
66+
SK_RST_REASON_TCP_FLAGS,
67+
/** @SK_RST_REASON_TCP_OLD_ACK: TCP ACK is old, but in window */
68+
SK_RST_REASON_TCP_OLD_ACK,
69+
/**
70+
* @SK_RST_REASON_TCP_ABORT_ON_DATA: abort on data
71+
* corresponding to LINUX_MIB_TCPABORTONDATA
72+
*/
73+
SK_RST_REASON_TCP_ABORT_ON_DATA,
6274

6375
/* Copy from include/uapi/linux/mptcp.h.
6476
* These reset fields will not be changed since they adhere to
@@ -143,6 +155,12 @@ sk_rst_convert_drop_reason(enum skb_drop_reason reason)
143155
return SK_RST_REASON_TCP_TOO_OLD_ACK;
144156
case SKB_DROP_REASON_TCP_ACK_UNSENT_DATA:
145157
return SK_RST_REASON_TCP_ACK_UNSENT_DATA;
158+
case SKB_DROP_REASON_TCP_FLAGS:
159+
return SK_RST_REASON_TCP_FLAGS;
160+
case SKB_DROP_REASON_TCP_OLD_ACK:
161+
return SK_RST_REASON_TCP_OLD_ACK;
162+
case SKB_DROP_REASON_TCP_ABORT_ON_DATA:
163+
return SK_RST_REASON_TCP_ABORT_ON_DATA;
146164
default:
147165
/* If we don't have our own corresponding reason */
148166
return SK_RST_REASON_NOT_SPECIFIED;

0 commit comments

Comments
 (0)