@@ -108,7 +108,7 @@ nf_conntrack_tcp_be_liberal - BOOLEAN
- not 0 - enabled
Be conservative in what you do, be liberal in what you accept from others.
- If it's non-zero, we mark only out of window RST segments as INVALID.
+ If it's non-zero, we don't mark out of window segments as INVALID.
nf_conntrack_tcp_loose - BOOLEAN
- 0 - disabled
@@ -1048,7 +1048,8 @@ int nf_conntrack_tcp_packet(struct nf_conn *ct,
if (ct->proto.tcp.seen[!dir].flags & IP_CT_TCP_FLAG_MAXACK_SET) {
u32 seq = ntohl(th->seq);
- if (before(seq, ct->proto.tcp.seen[!dir].td_maxack)) {
+ if (before(seq, ct->proto.tcp.seen[!dir].td_maxack) &&
+ !tn->tcp_be_liberal) {
/* Invalid RST */
spin_unlock_bh(&ct->lock);
nf_ct_l4proto_log_invalid(skb, ct, "invalid rst");
When tcp_be_liberal is set, don't be conservative on out of segments RSTs. Signed-off-by: Ali Abdallah <aabdallah@suse.de> --- Documentation/networking/nf_conntrack-sysctl.rst | 2 +- net/netfilter/nf_conntrack_proto_tcp.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)