Re: [ebtables-compat PATCH 2/2] ebtables-compat: add mark target extension

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

 



On 30 January 2015 at 19:51, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> On Thu, Jan 29, 2015 at 05:44:39PM +0100, Arturo Borrero Gonzalez wrote:
>> +static void brmark_final_check(unsigned int flags)
>> +{
>> +     if (!flags)
>> +             xtables_error(PARAMETER_PROBLEM,
>> +                           "You must specify some option");
>
> You can provide better error reporting by checking this flags:
>
>         if (!(flags & OPTION1 | OPTION2 | OPTION3))
>                 xtables_error(..., "you have to specify at least one of these: --option1, --option2, --option3");
>         if (!(flags & OPTION4))
>                 xtables_error(..., "--option4 is mandatory");
>

Actually these kind of checks are done in the parser itself. I just
can't report here nothing that weren't reported already regarding
options combination.
The only thing I can report is the absence of mark, which isn't
related to 'flags '.

Also, I discovered these final_check() functions were not being called
at all in ebt-compat.

So, sending a couple of patches...
-- 
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux