diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-03-17 19:01:28 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-03-17 19:01:28 +0100 |
commit | 427ea1601072ef9df45f2e52613125fbb50802d0 (patch) | |
tree | c306d20b23bc94a5546154c15c616ffdafab88c7 /examples | |
parent | d696047efe8d7356f441a52b43a531e6ca8ad3c7 (diff) |
examples: fix rule addition
Missing NLM_F_CREATE, otherwise the automatic handle allocation
returns -EINVAL.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/nft-rule-add.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/nft-rule-add.c b/examples/nft-rule-add.c index 5fbc796..b906715 100644 --- a/examples/nft-rule-add.c +++ b/examples/nft-rule-add.c @@ -161,7 +161,8 @@ int main(int argc, char *argv[]) seq = time(NULL); nlh = nft_rule_nlmsg_build_hdr(buf, NFT_MSG_NEWRULE, family, - NLM_F_APPEND|NLM_F_ACK, seq); + NLM_F_APPEND|NLM_F_ACK|NLM_F_CREATE, + seq); nft_rule_nlmsg_build_payload(nlh, r); nft_rule_free(r); |