netfilter: bridge: rework reject handling
authorFlorian Westphal <fw@strlen.de>
Mon, 16 Feb 2015 17:57:53 +0000 (18:57 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Mar 2015 01:10:51 +0000 (02:10 +0100)
commit72500bc11e4da570bd66c0965e2dc74f52c8aba2
treeebedd0a97d7b72022078435b9bae4215ce2f5023
parentee586bbc28fb7128133457cf711880d13a3b7ce4
netfilter: bridge: rework reject handling

bridge reject handling is not straightforward, there are many subtle
differences depending on configuration.

skb->dev is either the bridge port (PRE_ROUTING) or the bridge
itself (INPUT), so we need to use indev instead.

Also, checksum validation will only work reliably if we trim skb
according to the l3 header size.

While at it, add csum validation for ipv6 and skip existing tests
if skb was already checked e.g. by GRO.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/nft_reject_bridge.c