* [libnftnl PATCH] examples: nft-table-add: fix wrong buffer pointer
@ 2014-09-29 20:41 Arturo Borrero Gonzalez
2014-09-30 9:02 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-09-29 20:41 UTC (permalink / raw)
To: netfilter-devel; +Cc: pablo
We should point to the batch buffer as returned by the libmnl helper.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
examples/nft-table-add.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/nft-table-add.c b/examples/nft-table-add.c
index 828091e..9340128 100644
--- a/examples/nft-table-add.c
+++ b/examples/nft-table-add.c
@@ -85,7 +85,8 @@ int main(int argc, char *argv[])
table_seq = seq;
family = nft_table_attr_get_u32(t, NFT_TABLE_ATTR_FAMILY);
- nlh = nft_table_nlmsg_build_hdr(buf, NFT_MSG_NEWTABLE, family,
+ nlh = nft_table_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ NFT_MSG_NEWTABLE, family,
NLM_F_ACK, seq++);
nft_table_nlmsg_build_payload(nlh, t);
nft_table_free(t);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [libnftnl PATCH] examples: nft-table-add: fix wrong buffer pointer
2014-09-29 20:41 [libnftnl PATCH] examples: nft-table-add: fix wrong buffer pointer Arturo Borrero Gonzalez
@ 2014-09-30 9:02 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-09-30 9:02 UTC (permalink / raw)
To: Arturo Borrero Gonzalez; +Cc: netfilter-devel
On Mon, Sep 29, 2014 at 10:41:05PM +0200, Arturo Borrero Gonzalez wrote:
> We should point to the batch buffer as returned by the libmnl helper.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-30 9:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 20:41 [libnftnl PATCH] examples: nft-table-add: fix wrong buffer pointer Arturo Borrero Gonzalez
2014-09-30 9:02 ` Pablo Neira Ayuso
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).