diff mbox

[nftables,tool,v2,3/4] src: Add priority keyword on base chain description

Message ID 1378288222-13182-4-git-send-email-tomasz.bursztyka@linux.intel.com
State Accepted
Headers show

Commit Message

Tomasz Bursztyka Sept. 4, 2013, 9:50 a.m. UTC
Instead of:
add chain foo bar { type route hook input 0; }

it should be now:
add chain foo bar { type route hook input priority 0; }

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
---
 src/parser.y | 8 ++++----
 src/rule.c   | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Pablo Neira Ayuso Sept. 4, 2013, 10:46 a.m. UTC | #1
On Wed, Sep 04, 2013 at 12:50:21PM +0300, Tomasz Bursztyka wrote:
> Instead of:
> add chain foo bar { type route hook input 0; }
> 
> it should be now:
> add chain foo bar { type route hook input priority 0; }

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/parser.y b/src/parser.y
index 73a52d4..25da452 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -767,7 +767,7 @@  map_block		:	/* empty */	{ $$ = $<set>-1; }
 			}
 			;
 
-hook_spec		:	TYPE		STRING		HOOK		STRING		NUM
+hook_spec		:	TYPE		STRING		HOOK		STRING		PRIORITY	NUM
 			{
 				$<chain>0->type		= chain_type_name_lookup($2);
 				if ($<chain>0->type == NULL) {
@@ -781,10 +781,10 @@  hook_spec		:	TYPE		STRING		HOOK		STRING		NUM
 						   state->msgs);
 					YYERROR;
 				}
-				$<chain>0->priority	= $5;
+				$<chain>0->priority	= $6;
 				$<chain>0->flags	|= CHAIN_F_BASECHAIN;
 			}
-			|	TYPE		STRING		HOOK		STRING		DASH	NUM
+			|	TYPE		STRING		HOOK		STRING		PRIORITY	DASH	NUM
 			{
 				$<chain>0->type		= chain_type_name_lookup($2);
 				if ($<chain>0->type == NULL) {
@@ -798,7 +798,7 @@  hook_spec		:	TYPE		STRING		HOOK		STRING		NUM
 						   state->msgs);
 					YYERROR;
 				}
-				$<chain>0->priority	= -$6;
+				$<chain>0->priority	= -$7;
 				$<chain>0->flags	|= CHAIN_F_BASECHAIN;
 			}
 			;
diff --git a/src/rule.c b/src/rule.c
index 37dcc8c..56592e8 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -314,7 +314,7 @@  static void chain_print(const struct chain *chain)
 
 	printf("\tchain %s {\n", chain->handle.chain);
 	if (chain->flags & CHAIN_F_BASECHAIN) {
-		printf("\t\t type %s hook %s %u;\n", chain->type,
+		printf("\t\t type %s hook %s priority %u;\n", chain->type,
 		       hooknum2str(chain->handle.family, chain->hooknum),
 		       chain->priority);
 	}