All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Cc: "netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>,
	Florian Westphal <fw@strlen.de>,
	Marcelo Ricardo Leitner <mleitner@redhat.com>,
	Long Xin <lxin@redhat.com>,
	Claudio Porfiri <claudio.porfiri@ericsson.com>
Subject: Re: [PATCH v3 4/4] netfilter: conntrack: unify established states for SCTP paths
Date: Thu, 19 Jan 2023 11:48:49 +0100	[thread overview]
Message-ID: <Y8kgEYSad+Xa2uqh@salvia> (raw)
In-Reply-To: <DBBP189MB14337339D62954EE69D352C695C49@DBBP189MB1433.EURP189.PROD.OUTLOOK.COM>

On Thu, Jan 19, 2023 at 08:27:27AM +0000, Sriram Yagnaraman wrote:
> > -----Original Message-----
> > From: Pablo Neira Ayuso <pablo@netfilter.org>
> > Sent: Wednesday, 18 January 2023 16:29
> > To: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> > Cc: netfilter-devel@vger.kernel.org; Florian Westphal <fw@strlen.de>;
> > Marcelo Ricardo Leitner <mleitner@redhat.com>; Long Xin
> > <lxin@redhat.com>; Claudio Porfiri <claudio.porfiri@ericsson.com>
> > Subject: Re: [PATCH v3 4/4] netfilter: conntrack: unify established states for
> > SCTP paths
> > 
> > On Wed, Jan 18, 2023 at 12:38:53PM +0100, Sriram Yagnaraman wrote:
> > > An SCTP endpoint can start an association through a path and tear it
> > > down over another one. That means the initial path will not see the
> > > shutdown sequence, and the conntrack entry will remain in ESTABLISHED
> > > state for 5 days.
> > >
> > > By merging the HEARTBEAT_ACKED and ESTABLISHED states into one
> > > ESTABLISHED state, there remains no difference between a primary or
> > > secondary path. The timeout for the merged ESTABLISHED state is set to
> > > 210 seconds (hb_interval * max_path_retrans + rto_max). So, even if a
> > > path doesn't see the shutdown sequence, it will expire in a reasonable
> > > amount of time.
> > 
> > Thanks for new patchset version. One question below.
> > 
> > > @@ -523,8 +512,7 @@ int nf_conntrack_sctp_packet(struct nf_conn *ct,
> > >
> > >  	nf_ct_refresh_acct(ct, ctinfo, skb, timeouts[new_state]);
> > >
> > > -	if (old_state == SCTP_CONNTRACK_COOKIE_ECHOED &&
> > > -	    dir == IP_CT_DIR_REPLY &&
> > > +	if (dir == IP_CT_DIR_REPLY &&
> > >  	    new_state == SCTP_CONNTRACK_ESTABLISHED) {
> > >  		pr_debug("Setting assured bit\n");
> > >  		set_bit(IPS_ASSURED_BIT, &ct->status);
> > 
> > Why old_state == SCTP_CONNTRACK_COOKIE_ECHOED was removed to set
> > on the assured bit?
> > 
> 
> There is more than one state from which we can transition to
> ESTABLISHED now, COOKIE_ECHOED and HEARTBEAT_SENT. I will add a
> "old_state != new_state" check instead, so we don't set ASSURED
> every time there is a packet in the REPLY direction. I will wait for
> other review comments, before pushing another patchset version.

Thanks for explaining.

Please add this information to the commit description in the next
version.

      reply	other threads:[~2023-01-19 10:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 11:38 [PATCH v3 0/4] sctp conntrack fixes Sriram Yagnaraman
2023-01-18 11:38 ` [PATCH v3 1/4] netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE Sriram Yagnaraman
2023-01-18 11:38 ` [PATCH v3 2/4] netfilter: conntrack: fix bug in for_each_sctp_chunk Sriram Yagnaraman
2023-01-18 11:38 ` [PATCH v3 3/4] Revert "netfilter: conntrack: add sctp DATA_SENT state" Sriram Yagnaraman
2023-01-18 11:38 ` [PATCH v3 4/4] netfilter: conntrack: unify established states for SCTP paths Sriram Yagnaraman
2023-01-18 15:28   ` Pablo Neira Ayuso
2023-01-19  8:27     ` Sriram Yagnaraman
2023-01-19 10:48       ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y8kgEYSad+Xa2uqh@salvia \
    --to=pablo@netfilter.org \
    --cc=claudio.porfiri@ericsson.com \
    --cc=fw@strlen.de \
    --cc=lxin@redhat.com \
    --cc=mleitner@redhat.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=sriram.yagnaraman@est.tech \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.