Patchwork [nftables] rule: honor flag argument during rule creation

login
register
mail settings
Submitter Eric Leblond
Date July 8, 2013, 11 p.m.
Message ID <1373324424-5240-1-git-send-email-eric@regit.org>
Download mbox | patch
Permalink /patch/257613/
State Not Applicable
Headers show

Comments

Eric Leblond - July 8, 2013, 11 p.m.
---
 src/mnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/src/mnl.c b/src/mnl.c
index ea9637c..71fe73b 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -61,7 +61,7 @@  int mnl_nft_rule_add(struct mnl_socket *nf_sock, struct nft_rule *nlr,
 
 	nlh = nft_table_nlmsg_build_hdr(buf, NFT_MSG_NEWRULE,
 			nft_rule_attr_get_u32(nlr, NFT_RULE_ATTR_FAMILY),
-			NLM_F_APPEND|NLM_F_ACK|NLM_F_CREATE, seq);
+			flags|NLM_F_ACK|NLM_F_CREATE, seq);
 	nft_rule_nlmsg_build_payload(nlh, nlr);
 
 	return mnl_talk(nf_sock, nlh, nlh->nlmsg_len, NULL, NULL);