Re: [PATCH] extensions: libxt_mark: Add translation to nft

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

 



On Sun, Dec 6, 2015 at 4:44 AM, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> On Sat, Dec 05, 2015 at 08:14:09PM +0100, Pablo Neira Ayuso wrote:
>> Hi Shivani,
>>
>> On Sat, Dec 05, 2015 at 06:49:36PM +0530, Shivani Bhardwaj wrote:
>> > Add translation of the metainformation mark to nft.
>> >
>> > Signed-off-by: Shivani Bhardwaj <shivanib134@xxxxxxxxx>
>> > ---
>> >  extensions/libxt_mark.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++
>> >  1 file changed, 60 insertions(+)
>> >
>> > diff --git a/extensions/libxt_mark.c b/extensions/libxt_mark.c
>> > index 7f8c995..5105bf9 100644
>> > --- a/extensions/libxt_mark.c
>> > +++ b/extensions/libxt_mark.c
>> > @@ -102,6 +102,64 @@ mark_save(const void *ip, const struct xt_entry_match *match)
>> >     print_mark(info->mark, info->mask);
>> >  }
>> >
>> > +static void
>> > +print_mark_xlate(struct xt_buf *buf,
>> > +            unsigned int mark, unsigned int mask)
>> > +{
>> > +        if (mask != 0xffffffffU)
>> > +                xt_buf_add(buf, " 0x%x/0x%x", mark, mask);
>>
>> In nftables this should be translated to &.
>
> I mean:
>         xt_buf_add(buf, " & x%x == x%x", mask, mark);

OK. I'm sending version 2. Please check it.

Thank you
--
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