Skip to contentSkip to conversation

expr: log: fixed error in nft_rule_expr_parse

PATCH Applied Ana Rey 3 participants 3 messages Nov 19, 2013 netfilter

lore
Share & tools
lore

Ana Rey

author
#0 lore raw

PATCH 1/1 expr: log: fixed error in nft_rule_expr_parse

I fix it by allocating the correct value.

---
 src/expr/log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/expr/log.c +1 -1
index 2d3e0cf..495c1bd 100644
@@ -142,7 +142,7 @@ nft_rule_expr_log_parse(struct nft_rule_expr *e, struct nlattr *attr)
 			xfree(log->prefix);
 
 		log->prefix = strdup(mnl_attr_get_str(tb[NFTA_LOG_PREFIX]));
-		e->flags |= (1 << NFT_EXPR_LOG_GROUP);
+		e->flags |= (1 << NFT_EXPR_LOG_PREFIX);
 	}
 	if (tb[NFTA_LOG_GROUP]) {
 		log->group = ntohs(mnl_attr_get_u16(tb[NFTA_LOG_GROUP]));
Signature · 1 line
1.8.4.rc3
#1 lore raw

Hi,

Good catch. ACK.

Small thing, please modify the subject prefix so we know what is the target of this patch. For example, use [libnftables PATCH] instead of [PATCH]. You can use --subject-prefix of git to do so.

Quoted 10 lines · Ana Rey

I fix it by allocating the correct value.

---
 src/expr/log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/expr/log.c +0 -0
index 2d3e0cf..495c1bd 100644

src/expr/log.c nft_rule_expr_log_parse(struct nft_rule_expr *e, struct nlattr *attr) · line 148

Quoted 8 lines
src/expr/log.c +1 -1
@@ -142,7 +142,7 @@ nft_rule_expr_log_parse(struct nft_rule_expr *e, struct nlattr *attr)
 			xfree(log->prefix);
 
 		log->prefix = strdup(mnl_attr_get_str(tb[NFTA_LOG_PREFIX]));
-		e->flags |= (1 << NFT_EXPR_LOG_GROUP);
+		e->flags |= (1 << NFT_EXPR_LOG_PREFIX);
 	}
 	if (tb[NFTA_LOG_GROUP]) {
 		log->group = ntohs(mnl_attr_get_u16(tb[NFTA_LOG_GROUP]));

BR,

Signature · 2 lines
Eric Leblond <[email protected]>
Blog: https://home.regit.org/