From: Jan Engelhardt <jengelh@medozas.de>
To: Lutz Jaenicke <ljaenicke@innominate.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 07/11] libipt_DNAT: use guided option parser
Date: Wed, 18 May 2011 16:00:56 +0200 (CEST) [thread overview]
Message-ID: <alpine.LNX.2.01.1105181600060.25276@frira.zrqbmnf.qr> (raw)
In-Reply-To: <20110518135819.GA19013@lutz.bln.innominate.local>
On Wednesday 2011-05-18 15:58, Lutz Jaenicke wrote:
>> + case O_TO_DEST:
>> + if (cb->xflags & F_TO_DEST) {
>> if (!kernel_version)
>> get_kernel_version();
>> if (kernel_version > LINUX_VERSION(2, 6, 10))
>> xtables_error(PARAMETER_PROBLEM,
>> "Multiple --to-destination not supported");
>> }
>> - *target = parse_to(optarg, portok, info);
>> + *cb->target = parse_to(cb->arg, portok, info);
>> /* WTF do we need this for?? */
>> - if (*flags & IPT_DNAT_OPT_RANDOM)
>> + if (cb->xflags & F_RANDOM)
>> info->mr.range[0].flags |= IP_NAT_RANGE_PROTO_RANDOM;
>> - *flags |= IPT_DNAT_OPT_DEST;
>> - return 1;
>
>If I understand the logic correctly, cb->xflags will have F_TO_DEST set
>if the --to-destination option is found. The additional option parsing
>is only performed afterwards such that the (cb->xflags & F_TO_DEST) will
>be triggered already on the first and valid call and a "Multiple ... not
>supported" will be issued.
Fixed by my most recent submission (run 8), f25b235.
next prev parent reply other threads:[~2011-05-18 14:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 13:52 guided option parser, run 7 Jan Engelhardt
2011-05-11 13:52 ` [PATCH 01/11] libip6t_mh: use guided option parser Jan Engelhardt
2011-05-11 13:52 ` [PATCH 02/11] libip6t_rt: " Jan Engelhardt
2011-05-11 13:52 ` [PATCH 03/11] libxtables: XTTYPE_ETHERMAC support Jan Engelhardt
2011-05-11 13:52 ` [PATCH 04/11] libxt_mac: use guided option parser Jan Engelhardt
2011-05-11 13:52 ` [PATCH 05/11] libipt_CLUSTERIP: " Jan Engelhardt
2011-05-11 13:52 ` [PATCH 06/11] libxt_iprange: " Jan Engelhardt
2011-05-11 13:52 ` [PATCH 07/11] libipt_DNAT: " Jan Engelhardt
2011-05-18 13:58 ` Lutz Jaenicke
2011-05-18 14:00 ` Jan Engelhardt [this message]
2011-05-18 14:05 ` Lutz Jaenicke
2011-05-18 14:17 ` Jan Engelhardt
2011-05-11 13:52 ` [PATCH 08/11] libipt_SNAT: " Jan Engelhardt
2011-05-11 13:52 ` [PATCH 09/11] libipt_MASQUERADE: " Jan Engelhardt
2011-05-11 13:52 ` [PATCH 10/11] libipt_REDIRECT: " Jan Engelhardt
2011-05-11 13:52 ` [PATCH 11/11] libipt_SAME: " Jan Engelhardt
2011-05-12 9:14 ` guided option parser, run 7 Patrick McHardy
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=alpine.LNX.2.01.1105181600060.25276@frira.zrqbmnf.qr \
--to=jengelh@medozas.de \
--cc=ljaenicke@innominate.com \
--cc=netfilter-devel@vger.kernel.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.