netfilter: conntrack: avoid misleading 'invalid' in log message

The packet is not flagged as invalid: conntrack will accept it and
its associated with the conntrack entry.

This happens e.g. when receiving a retransmitted SYN in SYN_RECV state.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Florian Westphal
2021-02-24 17:23:20 +01:00
committed by Pablo Neira Ayuso
parent 03a3ca37e4
commit 07b5a76e18

View File

@@ -982,8 +982,10 @@ int nf_conntrack_tcp_packet(struct nf_conn *ct,
IP_CT_EXP_CHALLENGE_ACK; IP_CT_EXP_CHALLENGE_ACK;
} }
spin_unlock_bh(&ct->lock); spin_unlock_bh(&ct->lock);
nf_ct_l4proto_log_invalid(skb, ct, "invalid packet ignored in " nf_ct_l4proto_log_invalid(skb, ct,
"state %s ", tcp_conntrack_names[old_state]); "packet (index %d) in dir %d ignored, state %s",
index, dir,
tcp_conntrack_names[old_state]);
return NF_ACCEPT; return NF_ACCEPT;
case TCP_CONNTRACK_MAX: case TCP_CONNTRACK_MAX:
/* Special case for SYN proxy: when the SYN to the server or /* Special case for SYN proxy: when the SYN to the server or