From: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [iptables-nftables 1/2] xtables: fix missing ipt_entry for MASQUERADE target
Date: Tue, 08 Oct 2013 12:16:09 +0300 [thread overview]
Message-ID: <5253CD59.9060508@linux.intel.com> (raw)
In-Reply-To: <1381223479-1157-1-git-send-email-pablo@netfilter.org>
Hi Pablo,
> + /* Default on AF_INET */
> + h->ops = nft_family_ops_lookup(AF_INET);
> + if (h->ops == NULL)
> + xtables_error(PARAMETER_PROBLEM, "Unknown family");
> +
Since you use AF_INET by default...
> opts = xt_params->orig_opts;
> while ((cs.c = getopt_long(argc, argv,
> "-:A:C:D:R:I:L::S::M:F::Z::N:X::E:P:Vh::o:p:s:d:j:i:fbvnt:m:xc:g:46",
> @@ -894,6 +899,9 @@ int do_commandx(struct nft_handle *h, int argc, char *argv[], char **table)
> if (args.proto == 0 && (args.invflags & XT_INV_PROTO))
> xtables_error(PARAMETER_PROBLEM,
> "rule would never match protocol");
> +
> + /* This needs to happen here to parse extensions */
> + h->ops->proto_parse(&cs, &args);
> break;
>
> case 's':
> @@ -1033,11 +1041,21 @@ int do_commandx(struct nft_handle *h, int argc, char *argv[], char **table)
> case '4':
> if (args.family != AF_INET)
> exit_tryhelp(2);
> +
> + h->ops = nft_family_ops_lookup(args.family);
> + if (h->ops == NULL)
> + xtables_error(PARAMETER_PROBLEM,
> + "Unknown family");
... this is useless I guess, then.
Tomasz
next prev parent reply other threads:[~2013-10-08 9:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 9:11 [iptables-nftables 1/2] xtables: fix missing ipt_entry for MASQUERADE target Pablo Neira Ayuso
2013-10-08 9:11 ` [iptables-nftables 2/2] nft: pass ipt_entry to ->save_firewall hook Pablo Neira Ayuso
2013-10-08 9:16 ` Tomasz Bursztyka [this message]
2013-10-08 9:44 ` [iptables-nftables 1/2] xtables: fix missing ipt_entry for MASQUERADE target Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5253CD59.9060508@linux.intel.com \
--to=tomasz.bursztyka@linux.intel.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.