examples: nft-table-add: fix wrong buffer pointer
PATCH 1/1 examples: nft-table-add: fix wrong buffer pointer
We should point to the batch buffer as returned by the libmnl helper.
Signed-off-by Arturo Borrero Gonzalez <[email protected]>
--- examples/nft-table-add.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
examples/nft-table-add.c +2 -1
@@ -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);
Quoted 1 line · Arturo Borrero Gonzalez
We should point to the batch buffer as returned by the libmnl helper.
Applied, thanks.