Skip to content

netfilter: remove obsolete hook wrappers

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4netfilter: iptables: allow use of ipt_do_table as hookfninclude/linux/netfilter_ipv4/ip_tables.h net/ipv4/netfilter/ip_tables.c net/ipv4/netfilter/iptable_filter.c +4 more+18 -460 replies
1/4netfilter: ipv4: allow use of ipt_do_table as hookfninclude/linux/netfilter_ipv4/ip_tables.h net/ipv4/netfilter/ip_tables.c net/ipv4/netfilter/iptable_filter.c +4 more+18 -460 replies
2/4netfilter: arp_tables: allow use of arpt_do_table as hookfninclude/linux/netfilter_arp/arp_tables.h net/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/arptable_filter.c+7 -150 replies
3/4netfilter: ip6tables: allow use of ip6t_do_table as hookfninclude/linux/netfilter_ipv6/ip6_tables.h net/ipv6/netfilter/ip6_tables.c net/ipv6/netfilter/ip6table_filter.c +4 more+16 -470 replies
4/4netfilter: ebtables: allow use of ebt_do_table as hookfninclude/linux/netfilter_bridge/ebtables.h net/bridge/netfilter/ebtable_broute.c net/bridge/netfilter/ebtable_filter.c +2 more+12 -260 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH nf-next 0/4] netfilter: remove obsolete hook wrappers

An earlier series, starting with
commit a4aeafa28cf706f65f ("netfilter: xt_nat: pass table to hookfn"), converted the x_tables table implementations to store the hook blob in the ->priv pointer that gets passed to the hook function.

Before this, the blobs were stored in struct net, so each table required its own wrapper to fetch the correct table blob.

Nowadays, allmost all hook functions in x_table land just call the hook evaluation loop.

This series converts the table evaluation loop so it can be used directly, then removes most of the wrappers.

Florian Westphal (4):
netfilter: iptables: allow use of ipt_do_table as hookfn
netfilter: arp_tables: allow use of arpt_do_table as hookfn
netfilter: ip6tables: allow use of ip6t_do_table as hookfn
netfilter: ebtables: allow use of ebt_do_table as hookfn

 include/linux/netfilter_arp/arp_tables.h  |  5 ++---
 include/linux/netfilter_bridge/ebtables.h |  5 ++---
 include/linux/netfilter_ipv4/ip_tables.h  |  6 +++---
 include/linux/netfilter_ipv6/ip6_tables.h |  5 ++---
 net/bridge/netfilter/ebtable_broute.c     |  2 +-
 net/bridge/netfilter/ebtable_filter.c     | 13 +++----------
 net/bridge/netfilter/ebtable_nat.c        | 12 +++---------
 net/bridge/netfilter/ebtables.c           |  6 +++---
 net/ipv4/netfilter/arp_tables.c           |  7 ++++---
 net/ipv4/netfilter/arptable_filter.c      | 10 +---------
 net/ipv4/netfilter/ip_tables.c            |  7 ++++---
 net/ipv4/netfilter/iptable_filter.c       |  9 +--------
 net/ipv4/netfilter/iptable_mangle.c       |  8 ++++----
 net/ipv4/netfilter/iptable_nat.c          | 15 ++++-----------
 net/ipv4/netfilter/iptable_raw.c          | 10 +---------
 net/ipv4/netfilter/iptable_security.c     |  9 +--------
 net/ipv6/netfilter/ip6_tables.c           |  6 +++---
 net/ipv6/netfilter/ip6table_filter.c      | 10 +---------
 net/ipv6/netfilter/ip6table_mangle.c      |  8 ++++----
 net/ipv6/netfilter/ip6table_nat.c         | 15 ++++-----------
 net/ipv6/netfilter/ip6table_raw.c         | 10 +---------
 net/ipv6/netfilter/ip6table_security.c    |  9 +--------
 22 files changed, 53 insertions(+), 134 deletions(-)
Signature · 1 line
2.32.0