* [PATCH] examples: load modules when adding chains or tables
@ 2016-04-29 10:07 Daniel Wagner
2016-04-29 10:18 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Wagner @ 2016-04-29 10:07 UTC (permalink / raw)
To: netfilter-devel; +Cc: Daniel Wagner
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
Tell the kernel to load the necessary modules by adding
the NLM_F_CREATE flag.
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
---
This is for libnftnl.
examples/nft-chain-add.c | 2 +-
examples/nft-table-add.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/nft-chain-add.c b/examples/nft-chain-add.c
index 3afc06e..ca1edf9 100644
--- a/examples/nft-chain-add.c
+++ b/examples/nft-chain-add.c
@@ -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);
diff --git a/examples/nft-table-add.c b/examples/nft-table-add.c
index db6e39e..aa6e268 100644
--- a/examples/nft-table-add.c
+++ b/examples/nft-table-add.c
@@ -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);
--
2.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] examples: load modules when adding chains or tables
2016-04-29 10:07 [PATCH] examples: load modules when adding chains or tables Daniel Wagner
@ 2016-04-29 10:18 ` Pablo Neira Ayuso
2016-04-29 11:33 ` Daniel Wagner
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2016-04-29 10:18 UTC (permalink / raw)
To: Daniel Wagner; +Cc: netfilter-devel, Daniel Wagner
On Fri, Apr 29, 2016 at 12:07:34PM +0200, Daniel Wagner wrote:
> From: Daniel Wagner <daniel.wagner@bmw-carit.de>
>
> Tell the kernel to load the necessary modules by adding
> the NLM_F_CREATE flag.
Applied, thanks for following up on this.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] examples: load modules when adding chains or tables
2016-04-29 10:18 ` Pablo Neira Ayuso
@ 2016-04-29 11:33 ` Daniel Wagner
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Wagner @ 2016-04-29 11:33 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
On 04/29/2016 12:18 PM, Pablo Neira Ayuso wrote:
> On Fri, Apr 29, 2016 at 12:07:34PM +0200, Daniel Wagner wrote:
>> From: Daniel Wagner <daniel.wagner@bmw-carit.de>
>>
>> Tell the kernel to load the necessary modules by adding
>> the NLM_F_CREATE flag.
>
> Applied, thanks for following up on this.
np. you saved me time debugging, so it's a fair deal :)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-29 11:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29 10:07 [PATCH] examples: load modules when adding chains or tables Daniel Wagner
2016-04-29 10:18 ` Pablo Neira Ayuso
2016-04-29 11:33 ` Daniel Wagner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.