From 3f7877e6be987bb94897c03a45945725389a6f5c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 23 Feb 2013 18:27:08 +0100 Subject: xtables-restore: add -4 and -6 support Now you can specify: xtables-restore -6 < my-ip6tables-ruleset to restore the IPv6 rule-set. Signed-off-by: Pablo Neira Ayuso --- iptables/nft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/nft.c') diff --git a/iptables/nft.c b/iptables/nft.c index 273d0838..88fd84be 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -2630,7 +2630,7 @@ static int nft_action(struct nft_handle *h, int type) nlh->nlmsg_seq = seq = time(NULL); struct nfgenmsg *nfg = mnl_nlmsg_put_extra_header(nlh, sizeof(*nfg)); - nfg->nfgen_family = AF_INET; + nfg->nfgen_family = h->family; nfg->version = NFNETLINK_V0; nfg->res_id = 0; -- cgit v1.2.3