]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[NETFILTER]: nf_nat: add helpers for common NAT protocol operations
authorPatrick McHardy <kaber@trash.net>
Thu, 20 Mar 2008 14:15:47 +0000 (15:15 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 14 Apr 2008 09:15:46 +0000 (11:15 +0200)
commit937e0dfd87a8b7946a17161664500fba93eb13fd
tree2dae4611ca2fc22d8973dcf0dfbed315de70ff86
parent544473c1664f3a688be949ac078bdee6f4afeef1
[NETFILTER]: nf_nat: add helpers for common NAT protocol operations

Add generic ->in_range and ->unique_tuple ops to avoid duplicating them
again and again for future NAT modules and save a few bytes of text:

net/ipv4/netfilter/nf_nat_proto_tcp.c:
  tcp_in_range     |  -62 (removed)
  tcp_unique_tuple | -259 # 271 -> 12, # inlines: 1 -> 0, size inlines: 7 -> 0
 2 functions changed, 321 bytes removed

net/ipv4/netfilter/nf_nat_proto_udp.c:
  udp_in_range     |  -62 (removed)
  udp_unique_tuple | -259 # 271 -> 12, # inlines: 1 -> 0, size inlines: 7 -> 0
 2 functions changed, 321 bytes removed

net/ipv4/netfilter/nf_nat_proto_gre.c:
  gre_in_range |  -62 (removed)
 1 function changed, 62 bytes removed

vmlinux:
 5 functions changed, 704 bytes removed

Signed-off-by: Patrick McHardy <kaber@trash.net>
include/net/netfilter/nf_nat_protocol.h
net/ipv4/netfilter/Makefile
net/ipv4/netfilter/nf_nat_proto_common.c [new file with mode: 0644]
net/ipv4/netfilter/nf_nat_proto_gre.c
net/ipv4/netfilter/nf_nat_proto_tcp.c
net/ipv4/netfilter/nf_nat_proto_udp.c