log: fix qthreshold data type
PATCH 1/1 log: fix qthreshold data type
As stated in include/net/netfilter/nf_log.h, qthreshold is uint16_t instead of uint32_t.
This patch fixes it.
Signed-off-by Arturo Borrero Gonzalez <[email protected]>
--- src/expr/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
src/expr/log.c +3 -3
@@ -25,7 +25,7 @@struct nft_expr_log {uint32_t group;uint32_t snaplen; -uint32_t qthreshold; +uint16_t qthreshold;char *prefix; };
@@ -49,7 +49,7 @@ nft_rule_expr_log_set(struct nft_rule_expr *e, uint16_t type, log->snaplen = *((uint32_t *)data);break ;case NFT_EXPR_LOG_QTHRESHOLD : - log->qthreshold = *((uint32_t *)data); + log->qthreshold = *((uint16_t *)data);break ;default :return -1 ;
@@ -197,7 +197,7 @@ static int nft_rule_expr_log_xml_parse(struct nft_rule_expr *e, mxml_node_t *tre goto err; tmp =strtoull (node->child->value.opaque, &endptr,10 ); -if (tmp >UINT32_MAX || tmp <0 || *endptr) +if (tmp >UINT16_MAX || tmp <0 || *endptr) goto err; log->qthreshold = tmp;
Quoted 6 lines · Arturo Borrero Gonzalez
As stated in
include/net/netfilter/nf_log.h, qthreshold isuint16_tinstead ofuint32_t.This patch fixes it.
Signed-off-by Arturo Borrero Gonzalez <[email protected]>---
v2: still u32 in kernel.
Quoted 4 lines
src/expr/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
I forgot to note this as v2.
Signature · 5 lines
Arturo Borrero González -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html