From: Tomasz Bursztyka Date: Tue, 16 Jul 2013 12:38:45 +0000 (+0300) Subject: nft: Set the rule family when creating a new one X-Git-Tag: v1.6.0~111^2~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d370c4ad803c37eedfbee5963fac6f7e9968939c;p=thirdparty%2Fiptables.git 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 --- 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);