Skip to content

bridge: netfilter: fix handling of ipv4 packets w. options

Florian Westphal netdev netfilter-devel 1 version Applied

Status from this message: Applied, thanks Herbert.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 13 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3bridge: prepend inet_skb_param dummy to bridge cbnet/bridge/br.c net/bridge/br_private.h+8 -00 replies
2/3netfilter: bridge: don't parse ip headers in fwd and output pathnet/bridge/br_netfilter.c+2 -80 replies
3/3netfilter: bridge: don't mangle ipv4 header optionsnet/bridge/br_netfilter.c+19 -230 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchFlorian Westphal
SeriesT-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH nf next 0/3] bridge: netfilter: fix handling of ipv4 packets w. options

David Newall reported that bridge causes bad checksums:
http://thread.gmane.org/gmane.linux.network/315705/focus=1706769

The proposal was to revert
462fb2af9788a82a5 (bridge : Sanitize skb before it enters the IP stack).

However, this has some other adverse effects since bridge netfilter and ip stack both use skb->cb (and we thus memset skb->cb whenever we hand skb off to the ip stack).

So, this series attemps to resolve this a bit differently.

First, lets add the inet_param padding that Eric suggested previously. This means that any earlier setup of IPCB will be preserved inside the bridge layer.

This is also useful for netfilter since it will preserve IPCB(skb)->frag_max_size set up by ip defrag.

Second, this gets rid of the option parsing/memset calls in to forward and output cases.

Third, the pre-routing path is changed to not mangle the packets but to only validate the ip options.

This patch series is vs. next instead of net/nf tree.

This has been broken for so long that I don't think we need to rush this.