]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_time: --utc and --localtz are mutually exclusive
authorJan Engelhardt <jengelh@medozas.de>
Mon, 23 May 2011 15:48:20 +0000 (17:48 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 24 May 2011 23:02:44 +0000 (01:02 +0200)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libxt_time.c

index 67b7f45df9f7601f2ed89aed6a7063f39e3fbeeb..dfb0d5b73469e260c570c8da51f1aa564a8908f6 100644 (file)
@@ -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,
 };