Re: [PATCH v2] netfilter: nft_hash: Add hash offset value

2016-09-13 Thread Laura Garcia
On Tue, Sep 13, 2016 at 02:25:03PM +0800, Liping Zhang wrote: > Hi Laura, > > 2016-09-06 14:44 GMT+08:00 Laura Garcia Liebana : > > static int nft_hash_init(const struct nft_ctx *ctx, > > @@ -60,6 +62,11 @@ static int nft_hash_init(const struct nft_ctx *ctx, > >

Re: [PATCH v2] netfilter: nft_hash: Add hash offset value

2016-09-13 Thread Liping Zhang
Hi Laura, 2016-09-06 14:44 GMT+08:00 Laura Garcia Liebana : > static int nft_hash_init(const struct nft_ctx *ctx, > @@ -60,6 +62,11 @@ static int nft_hash_init(const struct nft_ctx *ctx, > !tb[NFTA_HASH_MODULUS]) > return -EINVAL; > > + if

Re: [PATCH v2] netfilter: nft_hash: Add hash offset value

2016-09-12 Thread Pablo Neira Ayuso
On Tue, Sep 06, 2016 at 08:44:19AM +0200, Laura Garcia Liebana wrote: > Add support to pass through an offset to the hash value. With this > feature, the sysadmin is able to generate a hash with a given > offset value. > > Example: > > meta mark set jhash ip saddr mod 2 seed 0xabcd sum 100

Re: [PATCH v2] netfilter: nft_hash: Add hash offset value

2016-09-12 Thread Laura Garcia
On Mon, Sep 12, 2016 at 06:34:59PM +0200, Pablo Neira Ayuso wrote: > Hi Laura, > > On Tue, Sep 06, 2016 at 08:44:19AM +0200, Laura Garcia Liebana wrote: > > Add support to pass through an offset to the hash value. With this > > feature, the sysadmin is able to generate a hash with a given > >

[PATCH v2] netfilter: nft_hash: Add hash offset value

2016-09-06 Thread Laura Garcia Liebana
Add support to pass through an offset to the hash value. With this feature, the sysadmin is able to generate a hash with a given offset value. Example: meta mark set jhash ip saddr mod 2 seed 0xabcd sum 100 This option generates marks according to the source address from 100 to 101.