]> git.karo-electronics.de Git - karo-tx-linux.git/commit
netfilter: nf_tables: make chain types override the default AF functions
authorPatrick McHardy <kaber@trash.net>
Fri, 3 Jan 2014 12:16:13 +0000 (12:16 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 7 Jan 2014 22:50:43 +0000 (23:50 +0100)
commit3b088c4bc0035da662faa81818ba217e34c4bba4
tree1d43e3ff229e464491a5764efae37ed030d11bd7
parent688d18636f77e360ae9078d7cd78a2556a1f35c1
netfilter: nf_tables: make chain types override the default AF functions

Currently the AF-specific hook functions override the chain-type specific
hook functions. That doesn't make too much sense since the chain types
are a special case of the AF-specific hooks.

Make the AF-specific hook functions the default and make the optional
chain type hooks override them.

As a side effect, the necessary code restructuring reduces the code size,
f.i. in case of nf_tables_ipv4.o:

  nf_tables_ipv4_init_net   |  -24
  nft_do_chain_ipv4         | -113
 2 functions changed, 137 bytes removed, diff: -137

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/nf_tables_bridge.c
net/ipv4/netfilter/nf_tables_arp.c
net/ipv4/netfilter/nf_tables_ipv4.c
net/ipv6/netfilter/nf_tables_ipv6.c
net/netfilter/nf_tables_api.c