Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4542148a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Reapply "netfilter: conntrack: don't refresh sctp entries in closed state"



This reverts commit 2867afd6 as it
causes merge conflicts with 5.4.258.  It will be added back after the
merge.

Change-Id: Ibe09c3b147ba00fb3978f0b7372c5fbdbf1bc93d
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7fe1de44
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -485,6 +485,15 @@ 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;