From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [libnftables PATCH] log: fix qthreshold data type
Date: Thu, 25 Jul 2013 11:59:41 +0200 [thread overview]
Message-ID: <20130725095941.22630.18584.stgit@nfdev.cica.es> (raw)
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 <arturo.borrero.glez@gmail.com>
---
src/expr/log.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/expr/log.c b/src/expr/log.c
index 1ffd1d9..d8502e5 100644
--- a/src/expr/log.c
+++ b/src/expr/log.c
@@ -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;
next reply other threads:[~2013-07-25 9:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 9:59 Arturo Borrero Gonzalez [this message]
2013-07-26 10:01 ` [libnftables PATCH] log: fix qthreshold data type Arturo Borrero Gonzalez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130725095941.22630.18584.stgit@nfdev.cica.es \
--to=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).