From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 7/8] extensions: add missing checks for specific flags
Date: Sat, 19 Feb 2011 20:04:17 +0100 [thread overview]
Message-ID: <1298142259-11213-8-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1298142259-11213-1-git-send-email-jengelh@medozas.de>
With "!flags", any option will be accepted. The extensions however
want one very specific option to be used (or wrong help text).
Commits: DNAT: v1.3.8~23, osf: v1.4.6~3
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
extensions/libipt_DNAT.c | 2 +-
extensions/libipt_ECN.c | 2 +-
extensions/libxt_osf.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/extensions/libipt_DNAT.c b/extensions/libipt_DNAT.c
index 34d3777..49c74e1 100644
--- a/extensions/libipt_DNAT.c
+++ b/extensions/libipt_DNAT.c
@@ -190,7 +190,7 @@ static int DNAT_parse(int c, char **argv, int invert, unsigned int *flags,
static void DNAT_check(unsigned int flags)
{
- if (!flags)
+ if (!(flags & IPT_DNAT_OPT_DEST))
xtables_error(PARAMETER_PROBLEM,
"You must specify --to-destination");
}
diff --git a/extensions/libipt_ECN.c b/extensions/libipt_ECN.c
index 6bfc1b3..e1f29b6 100644
--- a/extensions/libipt_ECN.c
+++ b/extensions/libipt_ECN.c
@@ -97,7 +97,7 @@ static void ECN_check(unsigned int flags)
{
if (!flags)
xtables_error(PARAMETER_PROBLEM,
- "ECN target: Parameter --ecn-tcp-remove is required");
+ "ECN target: An operation is required");
}
static void ECN_print(const void *ip, const struct xt_entry_target *target,
diff --git a/extensions/libxt_osf.c b/extensions/libxt_osf.c
index a97884b..20acfea 100644
--- a/extensions/libxt_osf.c
+++ b/extensions/libxt_osf.c
@@ -114,7 +114,7 @@ static int osf_parse(int c, char **argv, int invert, unsigned int *flags,
static void osf_final_check(unsigned int flags)
{
- if (!flags)
+ if (!(flags & XT_OSF_GENRE))
xtables_error(PARAMETER_PROBLEM,
"OS fingerprint match: You must specify `--genre'");
}
--
1.7.1
next prev parent reply other threads:[~2011-02-19 19:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-19 19:04 iptables: misc option edits Jan Engelhardt
2011-02-19 19:04 ` [PATCH 1/8] doc: fix wrong sentence about negation in xt_limit Jan Engelhardt
2011-02-19 19:04 ` [PATCH 2/8] doc: fix misspelling of "field" Jan Engelhardt
2011-02-19 19:04 ` [PATCH 3/8] extensions: remove redundant init functions Jan Engelhardt
2011-02-19 19:04 ` [PATCH 4/8] Remove unused CVS expanded keywords Jan Engelhardt
2011-02-19 19:04 ` [PATCH 5/8] libip6t_dst: remove unimplemented --dst-not-strict Jan Engelhardt
2011-02-19 19:04 ` [PATCH 6/8] libip6t_hbh: remove unimplemented --hbh-not-strict Jan Engelhardt
2011-02-19 19:04 ` Jan Engelhardt [this message]
2011-02-19 19:04 ` [PATCH 8/8] libipt_ECN: set proper option flags Jan Engelhardt
2011-02-23 16:40 ` iptables: misc option edits 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=1298142259-11213-8-git-send-email-jengelh@medozas.de \
--to=jengelh@medozas.de \
--cc=kaber@trash.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).