From: Jan Engelhardt <jengelh@inai.de>
To: Jeremy Sowden <jeremy@azazel.net>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH xtables-addons 2/3] pknock: pknlusr: fix hard-coded netlink multicast group ID.
Date: Fri, 23 Oct 2020 11:13:45 +0200 (CEST) [thread overview]
Message-ID: <3ns38p0-1pp5-3185-5r96-rqqo2r77s8p2@vanv.qr> (raw)
In-Reply-To: <20201022173006.635720-3-jeremy@azazel.net>
On Thursday 2020-10-22 19:30, Jeremy Sowden wrote:
>The group ID used by xt_pknock is configurable, but pknlusr hard-codes
>it to 1. Modify pknlusr to accept an optional ID from the command-line.
According to netlink(7), that is not a group ID but a bitmask of groups.
That changes the semantic quite significantly and would make this patch faulty.
>+ n = strtol(argv[1], &end, 10);
>+ if (*end || n < INT_MIN || n > INT_MAX) {
>+ usage(argv[0]);
>+ exit(EXIT_FAILURE);
>+ }
It's a u32. It can never be less than 0, but it can very well be more than
INT_MAX.
next prev parent reply other threads:[~2020-10-23 9:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 17:30 [PATCH xtables-addons 0/3] pknlusr improvements Jeremy Sowden
2020-10-22 17:30 ` [PATCH xtables-addons 1/3] pknock: pknlusr: fix formatting Jeremy Sowden
2020-10-22 17:30 ` [PATCH xtables-addons 2/3] pknock: pknlusr: fix hard-coded netlink multicast group ID Jeremy Sowden
2020-10-23 9:13 ` Jan Engelhardt [this message]
2020-10-25 10:58 ` Jeremy Sowden
2020-10-22 17:30 ` [PATCH xtables-addons 3/3] pknock: pknlusr: add man-page Jeremy Sowden
2020-10-23 9:24 ` Jan Engelhardt
2020-10-25 10:59 ` Jeremy Sowden
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=3ns38p0-1pp5-3185-5r96-rqqo2r77s8p2@vanv.qr \
--to=jengelh@inai.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).