summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_time.man
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2012-09-17 00:23:08 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2012-09-30 14:54:26 +0200
commit8d8896a3833292d091ee5a028f3461083bb956bd (patch)
treef0c40fa2e90052092773c6afa9ede957ad0dbb7d /extensions/libxt_time.man
parent1871796877956ee68a39092c6fc3678e5a9d1d88 (diff)
libxt_time: add support to ignore day transition
Currently, if you want to do something like: "match Monday, starting 23:00, for two hours" You need two rules, one for Mon 23:00 to 0:00 and one for Tue 0:00-1:00. The rule --weekdays Mo --timestart 23:00 --timestop 01:00 looks correct, but it will first match on monday from midnight to 1 a.m. and then again for another hour from 23:00 onwards. This permits userspace to explicitly ignore the day transition and match for a single, continuous time period instead. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libxt_time.man')
-rw-r--r--extensions/libxt_time.man12
1 files changed, 12 insertions, 0 deletions
diff --git a/extensions/libxt_time.man b/extensions/libxt_time.man
index 1d677b94..4c0cae06 100644
--- a/extensions/libxt_time.man
+++ b/extensions/libxt_time.man
@@ -30,6 +30,10 @@ Only match on the given weekdays. Possible values are \fBMon\fP, \fBTue\fP,
to \fB7\fP, respectively. You may also use two-character variants (\fBMo\fP,
\fBTu\fP, etc.).
.TP
+\fB\-\-contiguous\fP
+When \fB\-\-timestop\fP is smaller than \fB\-\-timestart\fP value, match
+this as a single time period instead distinct intervals. See EXAMPLES.
+.TP
\fB\-\-kerneltz\fP
Use the kernel timezone instead of UTC to determine whether a packet meets the
time regulations.
@@ -84,3 +88,11 @@ The fourth Friday in the month:
(Note that this exploits a certain mathematical property. It is not possible to
say "fourth Thursday OR fourth Friday" in one rule. It is possible with
multiple rules, though.)
+.PP
+Matching across days might not do what is expected. For instance,
+.IP
+\-m time \-\-weekdays Mo \-\-timestart 23:00 \-\-timestop 01:00
+Will match Monday, for one hour from midnight to 1 a.m., and then
+again for another hour from 23:00 onwards. If this is unwanted, e.g. if you
+would like 'match for two hours from Montay 23:00 onwards' you need to also specify
+the \-\-contiguous option in the example above.