netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 02/10] libxt_time: --utc and --localtz are mutually exclusive
Date: Tue, 24 May 2011 03:21:33 +0200	[thread overview]
Message-ID: <1306200102-12148-3-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1306200102-12148-1-git-send-email-jengelh@medozas.de>

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 extensions/libxt_time.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/extensions/libxt_time.c b/extensions/libxt_time.c
index 32f0bf3..a666433 100644
--- a/extensions/libxt_time.c
+++ b/extensions/libxt_time.c
@@ -26,6 +26,8 @@ enum {
 	O_WEEKDAYS,
 	O_LOCAL_TZ,
 	O_UTC,
+	F_LOCAL_TZ  = 1 << O_LOCAL_TZ,
+	F_UTC       = 1 << O_UTC,
 };
 
 static const char *const week_days[] = {
@@ -41,8 +43,10 @@ static const struct xt_option_entry time_opts[] = {
 	 .flags = XTOPT_INVERT},
 	{.name = "monthdays", .id = O_MONTHDAYS, .type = XTTYPE_STRING,
 	 .flags = XTOPT_INVERT},
-	{.name = "localtz", .id = O_LOCAL_TZ, .type = XTTYPE_NONE},
-	{.name = "utc", .id = O_UTC, .type = XTTYPE_NONE},
+	{.name = "localtz", .id = O_LOCAL_TZ, .type = XTTYPE_NONE,
+	 .excl = F_UTC},
+	{.name = "utc", .id = O_UTC, .type = XTTYPE_NONE,
+	 .excl = F_LOCAL_TZ},
 	XTOPT_TABLEEND,
 };
 
-- 
1.7.3.4


  parent reply	other threads:[~2011-05-24  1:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24  1:21 Option parsing fixes (t-10) Jan Engelhardt
2011-05-24  1:21 ` [PATCH 01/10] libxt_time: always ignore libc timezone Jan Engelhardt
2011-05-24  1:21 ` Jan Engelhardt [this message]
2011-05-24  1:21 ` [PATCH 03/10] doc: use .IP list for TCPMSS Jan Engelhardt
2011-05-24  1:21 ` [PATCH 04/10] doc: remove redundant .IP calls in libxt_time Jan Engelhardt
2011-05-24  1:21 ` [PATCH 05/10] libxt_time: remove --localtz option Jan Engelhardt
2011-05-24  1:21 ` [PATCH 06/10] libxt_u32: --u32 option is required Jan Engelhardt
2011-05-24  1:21 ` [PATCH 07/10] libip6t_rt: restore --rt-type storing Jan Engelhardt
2011-05-24  1:21 ` [PATCH 08/10] libxtables: more detailed error message on multi-int parsing Jan Engelhardt
2011-05-24  1:21 ` [PATCH 09/10] libxtables: use uintmax for xtables_strtoul Jan Engelhardt
2011-05-24  1:21 ` [PATCH 10/10] libxtables: make multiint parser have greater range Jan Engelhardt

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=1306200102-12148-3-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).