Skip to content

more bridge netfilter refactoring

Florian Westphal netdev netfilter-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 11 repliesIn review
  2. v18 patches 13 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: untangle ip_fragment and bridge netfilterinclude/linux/netfilter_bridge.h include/net/ip.h net/bridge/br_netfilter.c +1 more+43 -387 replies
2/6netfilter: bridge: don't use nf_bridge_info to store mac headerinclude/linux/netfilter_bridge.h net/bridge/br_netfilter.c+42 -360 replies
3/6netfilter: bridge: use skb->cb to track otherhost manglinginclude/linux/netfilter_bridge.h net/bridge/br_netfilter.c+47 -254 replies
4/6netfilter: bridge: don't use nf_bridge_info to store proto valueinclude/linux/netfilter_bridge.h net/bridge/br_netfilter.c+23 -70 replies
5/6netfilter: bridge: replace remaining flags with state enuminclude/linux/netfilter_bridge.h include/linux/skbuff.h net/bridge/br_netfilter.c +2 more+25 -170 replies
6/6netfilter: bridge: don't use nf_bridge storage during neigh resolutioninclude/linux/skbuff.h net/bridge/br_device.c net/bridge/br_netfilter.c +1 more+35 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 nf-next 0/6] more bridge netfilter refactoring

This is another batch towards the planned skb->nf_bridge removal.

These patches rid ip_fragment of the bridge netfilter mtu/ll hacks and remove the nf_bridge_info->data area that is used to store original mac address for refragmentation and neigh resolution.

The need to use it for the DNAT detection is already resolved via

http://patchwork.ozlabs.org/patch/448342/

These patches go on top of this.

While at it, this series also replaces the 'mask' flags with a tristate enum to separate those 'flags' that have to be visible outside of bridge netfilter context and those that are internal.

Tested, on host connected to kvm-bridge:

ping -s $bignum $ip_behind_bridge

on bridge:
-j REDIRECT
-j DNAT --to-destination $ip_behind_bridge

 include/linux/netfilter_bridge.h          |   36 ----
 include/linux/skbuff.h                    |   16 +
 include/net/ip.h                          |    4 
 net/bridge/br_device.c                    |    2 
 net/bridge/br_netfilter.c                 |  246 +++++++++++++++++++++---------
 net/bridge/br_private.h                   |    2 
 net/ipv4/ip_output.c                      |   37 ++--
 net/ipv4/netfilter/nf_defrag_ipv4.c       |    2 
 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c |    2 
 9 files changed, 215 insertions(+), 132 deletions(-)