Hi,
On 08/24/2014 05:15 PM, Pablo Neira Ayuso wrote:
Hi,
On Wed, Aug 20, 2014 at 10:03:18PM +0400, Alexey Perevalov wrote:
+static struct nfacct_filter *
+nfacct_filter_alloc(struct nlattr *attrs[NFACCT_FILTER_MAX + 1])
+{
+ struct nfacct_filter *filter = kzalloc(sizeof(struct nfacct_filter),
+ GFP_KERNEL);
+ if (!filter)
+ return ERR_PTR(-ENOMEM);
+
+ filter->mask = nla_get_be32(attrs[NFACCT_FILTER_MASK]);
+ filter->value = nla_get_be32(attrs[NFACCT_FILTER_VALUE]);
We have to use ntohl() here, it's the convention for nfnetlink.
I'm attaching a patch that resolves this plus some cleanups.
Please, let me know if you're OK with it. Thanks.
Yes, I'm ok with it.
sorry for double braces )
and thanks for correction.
BR,
Alexey
--
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