examples: load modules when adding chains or tables
PATCH 1/1 examples: load modules when adding chains or tables
From: Daniel Wagner <[email protected]>
Tell the kernel to load the necessary modules by adding the NLM_F_CREATE flag.
Signed-off-by Daniel Wagner <[email protected]>
---
This is for libnftnl.
examples/nft-chain-add.c | 2 +-
examples/nft-table-add.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
examples/nft-chain-add.c +1 -1
@@ -110,7 +110,7 @@ int main(int argc, char *argv[]) chain_seq = seq; nlh =nftnl_chain_nlmsg_build_hdr (mnl_nlmsg_batch_current (batch),NFT_MSG_NEWCHAIN , family, -NLM_F_ACK , seq++); +NLM_F_CREATE |NLM_F_ACK , seq++);nftnl_chain_nlmsg_build_payload (nlh, t);nftnl_chain_free (t);mnl_nlmsg_batch_next (batch);
examples/nft-table-add.c +1 -1
@@ -87,7 +87,7 @@ int main(int argc, char *argv[]) family =nftnl_table_get_u32 (t,NFTNL_TABLE_FAMILY ); nlh =nftnl_table_nlmsg_build_hdr (mnl_nlmsg_batch_current (batch),NFT_MSG_NEWTABLE , family, -NLM_F_ACK , seq++); +NLM_F_CREATE |NLM_F_ACK , seq++);nftnl_table_nlmsg_build_payload (nlh, t);nftnl_table_free (t);mnl_nlmsg_batch_next (batch);
Signature · 1 line
2.5.5
Quoted 4 lines · Daniel Wagner
From: Daniel Wagner <[email protected]>
Tell the kernel to load the necessary modules by adding the
NLM_F_CREATEflag.
Applied, thanks for following up on this.
Quoted 7 lines · Pablo Neira Ayuso
Quoted 4 lines · Daniel Wagner
From: Daniel Wagner <[email protected]>
Tell the kernel to load the necessary modules by adding the
NLM_F_CREATEflag.Applied, thanks for following up on this.
np. you saved me time debugging, so it's a fair deal :)