[PATCH] expr: match: fix wrong flag setting in nft_rule_expr_match_parse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Expression flags were incorrectly set. It should not manifest in any
bug as NFTA_MATCH_* and NFT_EXPR_MT_* are overlapping. Still incorrect
from the semantic side.

Reported-by: Ana Rey Botello <anarey@xxxxxxxxx>
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/expr/match.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/expr/match.c b/src/expr/match.c
index 5d02ee7..c7863b8 100644
--- a/src/expr/match.c
+++ b/src/expr/match.c
@@ -140,12 +140,12 @@ static int nft_rule_expr_match_parse(struct nft_rule_expr *e, struct nlattr *att
 			 mnl_attr_get_str(tb[NFTA_MATCH_NAME]));
 
 		match->name[XT_EXTENSION_MAXNAMELEN-1] = '\0';
-		e->flags |= (1 << NFTA_MATCH_NAME);
+		e->flags |= (1 << NFT_EXPR_MT_NAME);
 	}
 
 	if (tb[NFTA_MATCH_REV]) {
 		match->rev = ntohl(mnl_attr_get_u32(tb[NFTA_MATCH_REV]));
-		e->flags |= (1 << NFTA_MATCH_REV);
+		e->flags |= (1 << NFT_EXPR_MT_REV);
 	}
 
 	if (tb[NFTA_MATCH_INFO]) {
@@ -164,7 +164,7 @@ static int nft_rule_expr_match_parse(struct nft_rule_expr *e, struct nlattr *att
 		match->data = match_data;
 		match->data_len = len;
 
-		e->flags |= (1 << NFTA_MATCH_INFO);
+		e->flags |= (1 << NFT_EXPR_MT_INFO);
 	}
 
 	return 0;
-- 
1.7.10.4

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




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux