|
Ali Abdallah |
9338bc |
From 8982e3edf5bc06ae95feb9e27f0708a4e192180c Mon Sep 17 00:00:00 2001
|
|
Ali Abdallah |
9338bc |
From: Ali Abdallah <aabdallah@suse.de>
|
|
Ali Abdallah |
9338bc |
Date: Fri, 28 May 2021 11:13:18 +0200
|
|
Ali Abdallah |
9338bc |
Subject: [PATCH] netfilter: conntrack: avoid misleading 'invalid' in log
|
|
Ali Abdallah |
9338bc |
message
|
|
Ali Abdallah |
9338bc |
Patch-mainline: v5.12-rc3
|
|
Ali Abdallah |
9338bc |
Git-commit: 07b5a76e18925a595bfef44531dbf2f397bb5507
|
|
Ali Abdallah |
9338bc |
References: bsc#1183947 bsc#1185950
|
|
Ali Abdallah |
9338bc |
|
|
Ali Abdallah |
9338bc |
The packet is not flagged as invalid: conntrack will accept it and
|
|
Ali Abdallah |
9338bc |
its associated with the conntrack entry.
|
|
Ali Abdallah |
9338bc |
|
|
Ali Abdallah |
9338bc |
This happens e.g. when receiving a retransmitted SYN in SYN_RECV state.
|
|
Ali Abdallah |
9338bc |
|
|
Ali Abdallah |
9338bc |
Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
Ali Abdallah |
9338bc |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
Ali Abdallah |
9338bc |
|
|
Ali Abdallah |
9338bc |
Acked-by: Ali Abdallah <aabdallah@suse.de>
|
|
Ali Abdallah |
9338bc |
---
|
|
Ali Abdallah |
9338bc |
net/netfilter/nf_conntrack_proto_tcp.c | 6 ++++--
|
|
Ali Abdallah |
9338bc |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
Ali Abdallah |
9338bc |
|
|
Ali Abdallah |
9338bc |
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
|
|
Ali Abdallah |
9338bc |
index 85c1f8c21..0cf1b7805 100644
|
|
Ali Abdallah |
9338bc |
--- a/net/netfilter/nf_conntrack_proto_tcp.c
|
|
Ali Abdallah |
9338bc |
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
|
|
Ali Abdallah |
9338bc |
@@ -981,8 +981,10 @@ int nf_conntrack_tcp_packet(struct nf_conn *ct,
|
|
Ali Abdallah |
9338bc |
IP_CT_EXP_CHALLENGE_ACK;
|
|
Ali Abdallah |
9338bc |
}
|
|
Ali Abdallah |
9338bc |
spin_unlock_bh(&ct->lock);
|
|
Ali Abdallah |
9338bc |
- nf_ct_l4proto_log_invalid(skb, ct, "invalid packet ignored in "
|
|
Ali Abdallah |
9338bc |
- "state %s ", tcp_conntrack_names[old_state]);
|
|
Ali Abdallah |
9338bc |
+ nf_ct_l4proto_log_invalid(skb, ct,
|
|
Ali Abdallah |
9338bc |
+ "packet (index %d) in dir %d ignored, state %s",
|
|
Ali Abdallah |
9338bc |
+ index, dir,
|
|
Ali Abdallah |
9338bc |
+ tcp_conntrack_names[old_state]);
|
|
Ali Abdallah |
9338bc |
return NF_ACCEPT;
|
|
Ali Abdallah |
9338bc |
case TCP_CONNTRACK_MAX:
|
|
Ali Abdallah |
9338bc |
/* Special case for SYN proxy: when the SYN to the server or
|
|
Ali Abdallah |
9338bc |
--
|
|
Ali Abdallah |
9338bc |
2.26.2
|
|
Ali Abdallah |
9338bc |
|