netfilter: nat: remove nf_nat_l4proto struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series kills the l4proto abstraction in the NAT layer.

Its not needed.  Removing this reduces size both in source and compiled
code without loss in functionality.

The patches remove the l4proto functions one after another,
until they are all gone.

Last patch then cleans up all places that use/define such a struct.

Before:
   text	   data	    bss	    dec	    hex	filename
  22192	   1840	   4128	  28160	   6e00	nf_nat.ko
   8508	    936	      8	   9452	   24ec	nf_nat_ipv4.ko
  10131	    912	     12	  11055	   2b2f	nf_nat_ipv6.ko
   4743	   1588	      0	   6331	   18bb	nf_nat_pptp.ko
   2173	   1120	      2	   3295	    cdf	nf_nat_proto_gre.ko

After:
   text	   data	    bss	    dec	    hex	filename
  19709	   1856	   4128	  25693	   645d	nf_nat.ko
   7067	    936	      4	   8007	   1f47	nf_nat_ipv4.ko
   8438	    912	      8	   9358	   248e	nf_nat_ipv6.ko
   4655	   1588	      0	   6243	   1863	nf_nat_pptp.ko

The nf_nat_proto_gre module is removed.  The series depends on patches:

"netfilter: nat: remove unnecessary 'else if' branch"
and
"netfilter: nat: limit port clash resolution attempts"

currently in the patchwork queue.

Florian Westphal (8):
      netfilter: remove NF_NAT_RANGE_PROTO_RANDOM support
      netfilter: nat: un-export nf_nat_l4proto_unique_tuple
      netfilter: nat: remove l4proto->unique_tuple
      netfilter: nat: fold in_range indirection into caller
      netfilter: nat: remove l4proto->in_range
      netfilter: nat: remove l4proto->nlattr_to_range
      netfilter: nat: remove l4proto->manip_pkt
      netfilter: nat: remove nf_nat_l4proto struct

 include/linux/netfilter/nf_conntrack_proto_gre.h |    2 
 include/net/netfilter/nf_nat_l3proto.h           |    7 
 include/net/netfilter/nf_nat_l4proto.h           |   78 ----
 net/ipv4/netfilter/Kconfig                       |    5 
 net/ipv4/netfilter/Makefile                      |    5 
 net/ipv4/netfilter/nf_nat_l3proto_ipv4.c         |   43 --
 net/ipv4/netfilter/nf_nat_pptp.c                 |    2 
 net/ipv6/netfilter/Makefile                      |    2 
 net/ipv6/netfilter/nf_nat_l3proto_ipv6.c         |   43 --
 net/netfilter/Kconfig                            |   15 
 net/netfilter/Makefile                           |    7 
 net/netfilter/nf_conntrack_netlink.c             |    1 
 net/netfilter/nf_nat_core.c                      |  327 +++++++++++---------
 net/netfilter/nf_nat_proto.c                     |  343 +++++++++++++++++++++
 net/ipv4/netfilter/nf_nat_proto_gre.c              |  150 ---------
 net/ipv4/netfilter/nf_nat_proto_icmp.c             |   83 -----
 net/ipv6/netfilter/nf_nat_proto_icmpv6.c           |   90 -----
 net/netfilter/nf_nat_proto_common.c                |  131 --------
 net/netfilter/nf_nat_proto_dccp.c                  |   79 ----
 net/netfilter/nf_nat_proto_sctp.c                  |   74 ----
 net/netfilter/nf_nat_proto_tcp.c                   |   82 -----
 net/netfilter/nf_nat_proto_udp.c                   |  124 -------
 net/netfilter/nf_nat_proto_unknown.c               |   54 ---
 23 files changed, 552 insertions(+), 1195 deletions(-)




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux