From 2867afd6471fd2dabbf445b6d8c8c430517dda9d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 23 Feb 2022 15:08:43 +0100 Subject: [PATCH] Revert "netfilter: conntrack: don't refresh sctp entries in closed state" This reverts commit ba4b40356abd526a18c9804d93dbf63b20b2eebc which is commit 77b337196a9d87f3d6bb9b07c0436ecafbffda1e upstream. It needs to be reverted as it breaks the build because the previous commit 35452319ba50 ("Revert "netfilter: conntrack: allow sctp hearbeat after connection re-use"") reverted the change that this one is "fixing" so it is not needed. This fixes the build breakage with the merge of 5.4.181 into the android11-5.4-lts branch. Fixes: 56f5213db8a1 ("Merge 5.4.181 into android11-5.4-lts") Signed-off-by: Greg Kroah-Hartman Change-Id: Ia09f24936ac37a047f48e6e22e1b72204b1a6600 --- net/netfilter/nf_conntrack_proto_sctp.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c index f420fea54587..4f897b14b606 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c @@ -462,15 +462,6 @@ int nf_conntrack_sctp_packet(struct nf_conn *ct, pr_debug("Setting vtag %x for dir %d\n", ih->init_tag, !dir); ct->proto.sctp.vtag[!dir] = ih->init_tag; - - /* don't renew timeout on init retransmit so - * port reuse by client or NAT middlebox cannot - * keep entry alive indefinitely (incl. nat info). - */ - if (new_state == SCTP_CONNTRACK_CLOSED && - old_state == SCTP_CONNTRACK_CLOSED && - nf_ct_is_confirmed(ct)) - ignore = true; } ct->proto.sctp.state = new_state;