Re: [PATCH nf-next v4 00/10] netfilter: nft_bitwise: shift support

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

 



On 2020-01-16, at 15:48:33 +0100, Pablo Neira Ayuso wrote:
> On Wed, Jan 15, 2020 at 09:32:06PM +0000, Jeremy Sowden wrote:
> > The connmark xtables extension supports bit-shifts.  Add support for
> > shifts to nft_bitwise in order to allow nftables to do likewise,
> > e.g.:
> >
> >   nft add rule t c oif lo ct mark set meta mark << 8 | 0xab
> >   nft add rule t c iif lo meta mark & 0xff 0xab ct mark set meta mark >> 8
> >
> > Changes since v3:
> >
> >   * the length of shift values sent by nft may be less than
> >     sizeof(u32).
> >
> > Changes since v2:
> >
> >   * convert NFTA_BITWISE_DATA from u32 to nft_data;
> >   * add check that shift value is not too large;
> >   * use BITS_PER_TYPE to get the size of u32, rather than
> >     hard-coding it when evaluating shifts.
>
> Series applied, thanks.

Cheers. :) I'll update the userspace changes and send them out.

J.

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux