aboutsummaryrefslogtreecommitdiff
path: root/Documentation/connector
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@computergmbh.de>2008-03-10 16:42:40 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-10 16:42:40 -0700
commit4f4c9430cf5ee1ca3567bc88faf8b4c18ed0bd13 (patch)
tree083206f0e41fb084901fc12c1c6a761e9d90f4d5 /Documentation/connector
parent7000d38d6126d6ef928605bdacebc9f12279c5aa (diff)
[NETFILTER]: xt_time: fix failure to match on Sundays
From: Andrew Schulman <andrex@alumni.utexas.net> xt_time_match() in net/netfilter/xt_time.c in kernel 2.6.24 never matches on Sundays. On my host I have a rule like iptables -A OUTPUT -m time --weekdays Sun -j REJECT and it never matches. The problem is in localtime_2(), which uses r->weekday = (4 + r->dse) % 7; to map the epoch day onto a weekday in {0,...,6}. In particular this gives 0 for Sundays. But 0 has to be wrong; a weekday of 0 can never match. xt_time_match() has if (!(info->weekdays_match & (1 << current_time.weekday))) return false; and when current_time.weekday = 0, the result of the & is always zero, even when info->weekdays_match = XT_TIME_ALL_WEEKDAYS = 0xFE. Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/connector')
0 files changed, 0 insertions, 0 deletions