From: Florian Westphal <fw@strlen.de>
To: Phil Sutter <phil@nwl.cc>, Florian Westphal <fw@strlen.de>,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH iptables] extensions: libebt_stp: fix range checking
Date: Wed, 24 Jan 2024 16:42:16 +0100 [thread overview]
Message-ID: <20240124154216.GD31645@breakpoint.cc> (raw)
In-Reply-To: <ZbElUwojpsHjxnGO@orbyte.nwl.cc>
Phil Sutter <phil@nwl.cc> wrote:
> While you correctly hate the game instead of its player, you probably
> hate the wrong game: The code above indeed is confusing. Maybe one
> should move that monotonicity check into libxtables which should
> simplify it quite a bit. I'll have a look. :)
Something IS broken. Still not working on FC 39 test machine
even after fresh clone.
On a "working" VM:
export XTABLES_LIBDIR=$(pwd)/extensions
iptables/xtables-nft-multi ebtables -A INPUT --stp-root-cost 1
have 1 32765
@@ -150,7 +151,9 @@ static void brstp_parse(struct xt_option_call *cb)
RANGE_ASSIGN("root-prio", root_prio, cb->val.u16_range);
break;
case O_RCOST:
+ fprintf(stderr, "have %u %u\n", cb->val.u32_range[0], cb->val.u32_range[1]);
I can't even figure out where the correct max value is supposed to be set.
Varying the input:
xtables-nft-multi ebtables -A INPUT --stp-root-cost 1
have 1 32764
Looks to me as if the upper value is undefined.
Other users of *RC versions handle it in .parse, e.g. libxt_length.
No idea how this is working.
next prev parent reply other threads:[~2024-01-24 15:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 16:49 [PATCH iptables] extensions: libebt_stp: fix range checking Florian Westphal
2024-01-24 14:00 ` Phil Sutter
2024-01-24 14:37 ` Florian Westphal
2024-01-24 14:57 ` Phil Sutter
2024-01-24 15:42 ` Florian Westphal [this message]
2024-01-24 16:13 ` Phil Sutter
2024-01-25 14:44 ` Phil Sutter
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=20240124154216.GD31645@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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.