From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jeremy Sowden <jeremy@azazel.net>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH libnetfilter_conntrack 2/2] conntrack: simplify calculation of `struct sock_fprog` length
Date: Mon, 2 Jan 2023 17:19:54 +0100 [thread overview]
Message-ID: <Y7MEKg8Xnr2Ym41e@salvia> (raw)
In-Reply-To: <20221223162441.2692988-2-jeremy@azazel.net>
On Fri, Dec 23, 2022 at 04:24:41PM +0000, Jeremy Sowden wrote:
> When assigning the length to the `struct sock_fprog` object, we
> calculate it by multiplying the number of `struct sock_filter` objects,
> `j`, by `sizeof(struct sock_filter)` and then dividing by
> `sizeof(bsf[0])`, which, since `bsf[0]` is a `struct sock_filter`, is
> equal to `sizeof(struct sock_filter)`.
>
> Remove the `sizeof` expressions and just assign `j`.
Also applied, thanks
next prev parent reply other threads:[~2023-01-02 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 16:24 [PATCH libnetfilter_conntrack 1/2] conntrack: fix BPF code for filtering on big-endian architectures Jeremy Sowden
2022-12-23 16:24 ` [PATCH libnetfilter_conntrack 2/2] conntrack: simplify calculation of `struct sock_fprog` length Jeremy Sowden
2023-01-02 16:19 ` Pablo Neira Ayuso [this message]
2023-01-02 16:19 ` [PATCH libnetfilter_conntrack 1/2] conntrack: fix BPF code for filtering on big-endian architectures Pablo Neira Ayuso
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=Y7MEKg8Xnr2Ym41e@salvia \
--to=pablo@netfilter.org \
--cc=jeremy@azazel.net \
--cc=netfilter-devel@vger.kernel.org \
/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.