From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Laurent Bercot <ska-devel@skarnet.org>
Cc: netfilter@vger.kernel.org
Subject: Re: nftables: nft fails to add rules to chains
Date: Sun, 22 Mar 2015 19:31:06 +0100 [thread overview]
Message-ID: <20150322183106.GA4150@salvia> (raw)
In-Reply-To: <550B3069.7080209@skarnet.org>
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
On Thu, Mar 19, 2015 at 09:24:09PM +0100, Laurent Bercot wrote:
>
> Hello,
>
> (Platform: Intel Atom (x86_64), Linux 3.19.1, musl 1.1.7,
> latest nftables/libnftnl/libmnl from git. All iptables modules
> out of the kernel, all necessary nftables modules in.)
>
> I can flush tables, create tables and create chains with nft
> without trouble; however, every time I try and add a rule to
> a chain, no matter what chain, no matter in what table, I get
> the following error:
>
> netlink.c:182: Memory allocation failure
I think this error is bogus. Please, apply this patch to libnftnl and
let us know. For some reason __init is being ignored, are you using
gcc?
[-- Attachment #2: x.patch --]
[-- Type: text/x-diff, Size: 465 bytes --]
diff --git a/src/expr.c b/src/expr.c
index 79782fa..db84d0b 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -29,8 +29,11 @@ struct nft_rule_expr *nft_rule_expr_alloc(const char *name)
struct expr_ops *ops;
ops = nft_expr_ops_lookup(name);
- if (ops == NULL)
+ if (ops == NULL) {
+ fprintf(stderr, "libnftnl: Expression '%s' not supported\n",
+ name);
return NULL;
+ }
expr = calloc(1, sizeof(struct nft_rule_expr) + ops->alloc_len);
if (expr == NULL)
next prev parent reply other threads:[~2015-03-22 18:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 20:24 nftables: nft fails to add rules to chains Laurent Bercot
2015-03-21 20:16 ` Laurent Bercot
2015-03-22 18:31 ` Pablo Neira Ayuso [this message]
2015-03-22 18:45 ` Laurent Bercot
2015-03-22 18:47 ` Laurent Bercot
2015-03-22 19:00 ` Pablo Neira Ayuso
2015-03-22 19:00 ` Laurent Bercot
2015-03-23 11:45 ` Pablo Neira Ayuso
2015-03-23 13:32 ` nftables feature request: don't fail "flush" on nonexistent tables (was: nftables: nft fails to add rules to chains) Laurent Bercot
2015-03-23 19:42 ` Arturo Borrero Gonzalez
2015-03-24 10:06 ` nftables feature request: don't fail "flush" on nonexistent tables Laurent Bercot
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=20150322183106.GA4150@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=ska-devel@skarnet.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