Patchwork [iptables-nftables,5/5] nft: fix family operation lookup

login
register
mail settings
Submitter Giuseppe Longo
Date July 26, 2013, 11:05 a.m.
Message ID <1374836719-27596-5-git-send-email-giuseppelng@gmail.com>
Download mbox | patch
Permalink /patch/262129/
State Accepted
Headers show

Comments

Giuseppe Longo - July 26, 2013, 11:05 a.m.
This fixes the family operations lookup: handle's family is the one to use at this point

Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
---
 iptables/xtables.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Pablo Neira - July 30, 2013, 9:46 a.m.
On Fri, Jul 26, 2013 at 01:05:19PM +0200, Giuseppe Longo wrote:
> This fixes the family operations lookup: handle's family is the one
> to use at this point

I have applied this with a couple more fixes for the IPv6 side. I have
also reworked the description.

Thanks Giuseppe.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/iptables/xtables.c b/iptables/xtables.c
index 59f38a9..eb614c6 100644
--- a/iptables/xtables.c
+++ b/iptables/xtables.c
@@ -1110,7 +1110,7 @@  int do_commandx(struct nft_handle *h, int argc, char *argv[], char **table)
 	if (h->family == AF_UNSPEC)
 		h->family = args.family;
 
-	h->ops = nft_family_ops_lookup(args.family);
+	h->ops = nft_family_ops_lookup(h->family);
 	if (h->ops == NULL)
 		xtables_error(PARAMETER_PROBLEM, "Unknown family");