[PATCH V2] netfilter: ipv4: fix NULL dereference

2016-03-26 Thread Liping Zhang
From: Liping Zhang Commit fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob") use sock_net(skb->sk) to get the net namespace, but we can't assume that sk_buff->sk is always exist, so when it is NULL, oops will happen. Signed-off-by: Liping Zhang Reviewed-by: Nikolay Borisov --- net

[PATCH nf-next v6 1/3] netfilter: bridge: add nf_afinfo to enable queuing to userspace

2016-03-26 Thread Stephane Bryant
From: stephane This just adds and registers a nf_afinfo for the ethernet bridge, which enables queuing to userspace for the AF_BRIDGE family. No checksum computation is done. Signed-off-by: Stephane Bryant --- net/bridge/netfilter/nf_tables_bridge.c | 47 +++-- 1 fi

[PATCH nf-next v6 2/3] netfilter: bridge: pass L2 header and VLAN as netlink attributes in queues to userspace

2016-03-26 Thread Stephane Bryant
From: stephane -this creates 2 netlink attribute NLQA_VLAN and NLQA_L2HDR -these are filled up for the PF_BRIDGE family on the way to userspace -NFQA_VLAN is a nested attribute, with the NFQA_VLAN_PROTO and the NFQA_VLAN_TCI carrying the corresponding vlan_proto and vlan_tci fields from the skb

[PATCH nf-next v6 3/3] netfilter: bridge: nf queue verdict to use NFQA_VLAN and NFQA_L2HDR

2016-03-26 Thread Stephane Bryant
This makes nf queues use NFQA_VLAN and NFQA_L2HDR in verdict to modify the original skb Signed-off-by: Stephane Bryant --- net/netfilter/nfnetlink_queue.c | 45 + 1 file changed, 45 insertions(+) diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilte