]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: Wrap netfilter hooks around human readable strings
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Wed, 4 Sep 2013 09:50:19 +0000 (12:50 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 4 Sep 2013 10:31:17 +0000 (12:31 +0200)
commit108d9f6b3af0f70459fb7ccc1dfc5452d3f3646e
tree69f0d49bbc5e8daf02129b47caeee7ea4457d87b
parentffad92b5f34d9960d8c6b1c70041b347634a2a76
src: Wrap netfilter hooks around human readable strings

This allows to use unique, human readable, hook names for the command
line and let the user being unaware of the complex netfilter's hook
names and there difference depending on the netfilter family.

So:
add chain foo bar { type route hook NF_INET_LOCAL_IN 0; }

becomes:
add chain foo bar { type route hook input 0; }

It also fixes then the difference in hook values between families.
I.e. ARP family has different values for input, forward and output
compared to IPv4, IPv6 or bridge.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/rule.h
src/evaluate.c
src/parser.y
src/rule.c
src/scanner.l