From 108d9f6b3af0f70459fb7ccc1dfc5452d3f3646e Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Wed, 4 Sep 2013 12:50:19 +0300 Subject: 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 Signed-off-by: Pablo Neira Ayuso --- src/scanner.l | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/scanner.l') diff --git a/src/scanner.l b/src/scanner.l index 59e0aac7..cee6aa6e 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -212,12 +212,6 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr}) "=>" { return ARROW; } "vmap" { return VMAP; } -"NF_INET_PRE_ROUTING" { yylval->val = NF_INET_PRE_ROUTING; return HOOKNUM; } -"NF_INET_LOCAL_IN" { yylval->val = NF_INET_LOCAL_IN; return HOOKNUM; } -"NF_INET_FORWARD" { yylval->val = NF_INET_FORWARD; return HOOKNUM; } -"NF_INET_LOCAL_OUT" { yylval->val = NF_INET_LOCAL_OUT; return HOOKNUM; } -"NF_INET_POST_ROUTING" { yylval->val = NF_INET_POST_ROUTING; return HOOKNUM; } - "include" { return INCLUDE; } "define" { return DEFINE; } -- cgit v1.2.3