14 Apr, 2008

1 commit


11 Mar, 2008

1 commit

  • From: Andrew Schulman

    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
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Jan Engelhardt
     

29 Jan, 2008

2 commits


13 Nov, 2007

1 commit


07 Nov, 2007

1 commit


11 Oct, 2007

1 commit

  • This is ipt_time from POM-ng enhanced by the following:

    * xtables/ipv6 support
    * second granularity for daytime
    * day-of-month support (for example "match on the 15th of each month")
    * match against UTC or local timezone

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Jan Engelhardt