Writing metadata to a packet

2017-03-30 Thread Vikas
Hi, I was wondering if how we can set some user specified values when we punt a packet from source to destination in a infrastructure which uses netfilter? More precisely at the source side so that when packet reaches destination host, it can decode the metadata values. Is their a way out?

[PATCH] iptables: extensions: Remove spaces.

2017-03-30 Thread Arushi Singhal
Solve the checkpatch issue: space prohibited before close parenthesis ')' space prohibited after open parenthesis '(' Signed-off-by: Arushi Singhal --- extensions/libip6t_ah.c | 4 ++-- extensions/libip6t_dst.c | 6 +++--- extensions/libip6t_hbh.c | 6 +++--- 3

Re: [PATCH v2] net: netfilter: remove unused variable

2017-03-30 Thread Pablo Neira Ayuso
On Thu, Mar 30, 2017 at 07:38:08PM +0530, Arushi Singhal wrote: > On Thu, Mar 30, 2017 at 6:25 PM, Simon Horman wrote: > > > On Wed, Mar 29, 2017 at 08:27:52PM +0530, Arushi Singhal wrote: > > > This patch uses the following coccinelle script to remove > > > a variable that

[PATCH v2] iptables: extensions: Remove assignments in if condition.

2017-03-30 Thread Arushi Singhal
Remove assignments in if condition as reported by checkpatch.pl. Signed-off-by: Arushi Singhal --- change in v2 *remove the error. extensions/libebt_ip.c | 9 ++--- extensions/libip6t_ipv6header.c | 5 +++-- 2 files changed, 9 insertions(+), 5

Re: [PATCH v2] net: netfilter: remove unused variable

2017-03-30 Thread Simon Horman
On Wed, Mar 29, 2017 at 08:27:52PM +0530, Arushi Singhal wrote: > This patch uses the following coccinelle script to remove > a variable that was simply used to store the return > value of a function call before returning it: > > @@ > identifier len,f; > @@ > > -int len; > ... when != len >

Re: [PATCH nf-next] netfilter: ipvs: don't check for presence of nat extension

2017-03-30 Thread Simon Horman
On Tue, Mar 28, 2017 at 10:31:20AM +0200, Florian Westphal wrote: > Check for the NAT status bits, they are set once conntrack needs NAT in > source or > reply direction, this is slightly faster than nfct_nat() as that has to check > the > extension area. > > Signed-off-by: Florian Westphal

[PATCH] iptables: extensions: Remove typedef in struct.

2017-03-30 Thread Arushi Singhal
The Linux kernel coding style guidelines suggest not using typedefs for structure. This patch gets rid of the typedefs for "_code". The following Coccinelle semantic patch detects the cases for struct type: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td;

Re: [PATCH] iptables: extensions: Remove assignment in if condition.

2017-03-30 Thread Florian Westphal
Arushi Singhal wrote: > Remove assignments in if condition as reported by checkpatch.pl. > > Signed-off-by: Arushi Singhal > --- > extensions/libebt_ip.c | 11 ++- > extensions/libip6t_ipv6header.c | 5 +++-- >