Re: [PATCH iptables] extensions: libebt_stp: fix range checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Phil Sutter <phil@xxxxxx> 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);
        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.

[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux