]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - net/netfilter/nf_conntrack_standalone.c
netfilter: conntrack: remove l3proto abstraction
authorFlorian Westphal <fw@strlen.de>
Fri, 29 Jun 2018 05:46:51 +0000 (07:46 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 17 Jul 2018 13:27:49 +0000 (15:27 +0200)
commita0ae2562c6c4b2721d9fddba63b7286c13517d9f
treed57aa096dba122f1b4e6fd83625591c6a7f7f531
parentc779e849608a875448f6ffc2a5c2a15523bdcd00
netfilter: conntrack: remove l3proto abstraction

This unifies ipv4 and ipv6 protocol trackers and removes the l3proto
abstraction.

This gets rid of all l3proto indirect calls and the need to do
a lookup on the function to call for l3 demux.

It increases module size by only a small amount (12kbyte), so this reduces
size because nf_conntrack.ko is useless without either nf_conntrack_ipv4
or nf_conntrack_ipv6 module.

before:
   text    data     bss     dec     hex filename
   7357    1088       0    8445    20fd nf_conntrack_ipv4.ko
   7405    1084       4    8493    212d nf_conntrack_ipv6.ko
  72614   13689     236   86539   1520b nf_conntrack.ko
 19K nf_conntrack_ipv4.ko
 19K nf_conntrack_ipv6.ko
179K nf_conntrack.ko

after:
   text    data     bss     dec     hex filename
  79277   13937     236   93450   16d0a nf_conntrack.ko
  191K nf_conntrack.ko

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
21 files changed:
include/net/netfilter/ipv4/nf_conntrack_ipv4.h
include/net/netfilter/nf_conntrack.h
include/net/netfilter/nf_conntrack_core.h
include/net/netfilter/nf_conntrack_l3proto.h [deleted file]
include/net/netfilter/nf_conntrack_l4proto.h
net/ipv4/netfilter/Kconfig
net/ipv4/netfilter/Makefile
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c [deleted file]
net/ipv4/netfilter/nf_conntrack_proto_icmp.c [deleted file]
net/ipv6/netfilter/Kconfig
net/ipv6/netfilter/Makefile
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c [deleted file]
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c [deleted file]
net/netfilter/Kconfig
net/netfilter/Makefile
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_proto.c
net/netfilter/nf_conntrack_proto_icmp.c [new file with mode: 0644]
net/netfilter/nf_conntrack_proto_icmpv6.c [new file with mode: 0644]
net/netfilter/nf_conntrack_standalone.c
net/netfilter/nf_nat_core.c