lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 25 Jun 2021 12:23:41 -0400
From:   Xin Long <lucien.xin@...il.com>
To:     Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Cc:     network dev <netdev@...r.kernel.org>, davem <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "linux-sctp @ vger . kernel . org" <linux-sctp@...r.kernel.org>,
        David Laight <david.laight@...lab.com>
Subject: Re: [PATCH net-next 1/2] sctp: do black hole detection in search
 complete state

On Thu, Jun 24, 2021 at 9:11 PM Marcelo Ricardo Leitner
<marcelo.leitner@...il.com> wrote:
>
> On Thu, Jun 24, 2021 at 11:48:08AM -0400, Xin Long wrote:
> > @@ -333,13 +328,15 @@ void sctp_transport_pl_recv(struct sctp_transport *t)
> >               t->pl.probe_size += SCTP_PL_MIN_STEP;
> >               if (t->pl.probe_size >= t->pl.probe_high) {
> >                       t->pl.probe_high = 0;
> > +                     t->pl.raise_count = 0;
> >                       t->pl.state = SCTP_PL_COMPLETE; /* Search -> Search Complete */
> >
> >                       t->pl.probe_size = t->pl.pmtu;
> >                       t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t);
> >                       sctp_assoc_sync_pmtu(t->asoc);
> >               }
> > -     } else if (t->pl.state == SCTP_PL_COMPLETE) {
> > +     } else if (t->pl.state == SCTP_PL_COMPLETE && ++t->pl.raise_count == 30) {
>
> Please either break the condition into 2 lines or even in 2 if()s. The
> ++ operator here can easily go unnoticed otherwise.
will change it to:
        } else if (t->pl.state == SCTP_PL_COMPLETE) {
                t->pl.raise_count++;
                if (t->pl.raise_count == 30) {

Thanks.
>
> > +             /* Raise probe_size again after 30 * interval in Search Complete */
> >               t->pl.state = SCTP_PL_SEARCH; /* Search Complete -> Search */
> >               t->pl.probe_size += SCTP_PL_MIN_STEP;
> >       }
> > --
> > 2.27.0
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ