path: root/iptables
diff options
authorTomasz Bursztyka <>2013-07-16 15:38:45 +0300
committerPablo Neira Ayuso <>2013-12-30 23:50:36 +0100
commitd370c4ad803c37eedfbee5963fac6f7e9968939c (patch)
tree924946b7f15b0dd6fba26fa684e874ecc63a45f0 /iptables
parent10f92fce0a2ea1805c8b269543b8f1738d22bf3d (diff)
nft: Set the rule family when creating a new one
Fixes the debug output from (in case of ipv4 rule): DEBUG: rule: arp filter INPUT 0 to: DEBUG: rule: ip filter INPUT 0 Signed-off-by: Tomasz Bursztyka <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'iptables')
1 files changed, 1 insertions, 0 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index 3d5a1532..ec1007ed 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -690,6 +690,7 @@ nft_rule_add(struct nft_handle *h, const char *chain, const char *table,
goto err;
+ nft_rule_attr_set_u32(r, NFT_RULE_ATTR_FAMILY, h->family);
nft_rule_attr_set(r, NFT_RULE_ATTR_TABLE, (char *)table);
nft_rule_attr_set(r, NFT_RULE_ATTR_CHAIN, (char *)chain);