path: root/src
diff options
authorPablo Neira Ayuso <>2014-01-17 13:20:39 +0100
committerPablo Neira Ayuso <>2014-01-17 13:21:26 +0100
commit3d16ff2523f3a3d09fd3056e86308cd7089e8c27 (patch)
tree9dc970d064807c9018e718db4792a1e8980426db /src
parente407cc18def5856592918a3d26855dbc93151cde (diff)
mnl: fix chain type autoloading
Add missing NLM_F_CREATE flag when creating new chains to trigger module autoloading in the kernel. Reported-by: Ana Rey Botello <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mnl.c b/src/mnl.c
index 16625000..d457e319 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -394,7 +394,7 @@ int mnl_nft_chain_add(struct mnl_socket *nf_sock, struct nft_chain *nlc,
nlh = nft_chain_nlmsg_build_hdr(buf, NFT_MSG_NEWCHAIN,
nft_chain_attr_get_u32(nlc, NFT_CHAIN_ATTR_FAMILY),
- NLM_F_ACK|flags, seq);
+ NLM_F_CREATE|NLM_F_ACK|flags, seq);
nft_chain_nlmsg_build_payload(nlh, nlc);
return mnl_talk(nf_sock, nlh, nlh->nlmsg_len, NULL, NULL);