linux/net
Jan Engelhardt 4f4c9430cf [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>
2008-03-10 16:42:40 -07:00
..
9p net/9p/trans_virtio.c: kmalloc() enough memory 2008-02-19 16:25:30 -08:00
802 [TR] net/802/tr.c: sysctl_tr_rif_timeout static 2008-01-31 19:28:31 -08:00
8021q [8021Q]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:14:58 -08:00
appletalk [APPLETALK]: Use proc_create() to setup ->proc_fops first 2008-02-28 12:53:32 -08:00
atm [ATM]: Use proc_create() to setup ->proc_fops first 2008-02-28 13:55:45 -08:00
ax25 [AX25] ax25_out: check skb for NULL in ax25_kick() 2008-02-17 22:31:19 -08:00
bluetooth bluetooth: make bnep_sock_cleanup() return void 2008-03-05 18:47:40 -08:00
bridge [NETFILTER]: fix ebtable targets return 2008-02-23 20:22:27 -08:00
can [CAN]: Minor clean-ups 2008-02-07 18:05:04 -08:00
core [NETPOLL]: Revert two bogus cleanups that broke netconsole. 2008-03-04 12:28:49 -08:00
dccp [SOCK] proto: Add hashinfo member to struct proto 2008-02-03 04:28:52 -08:00
decnet [DECNET] ROUTE: remove unecessary alignment 2008-02-07 23:29:57 -08:00
econet
ethernet
ieee80211
ipv4 [IPCONFIG]: The kernel gets no IP from some DHCP servers 2008-03-04 17:03:49 -08:00
ipv6 [ESP]: Add select on AUTHENC 2008-03-04 14:29:21 -08:00
ipx [IPX]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:06:14 -08:00
irda [IRDA]: Use proc_create() to setup ->proc_fops first 2008-02-29 10:34:45 -08:00
iucv iucv: fix build error on !SMP 2008-03-03 12:12:33 -08:00
key [AF_KEY]: Fix oops by converting to proc_net_*(). 2008-02-26 22:23:31 -08:00
lapb
llc [LLC]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:08:54 -08:00
mac80211 rc80211-pid: fix rate adjustment 2008-03-04 18:36:35 -05:00
netfilter [NETFILTER]: xt_time: fix failure to match on Sundays 2008-03-10 16:42:40 -07:00
netlabel [NETLABEL]: Move some initialization code into __init section. 2008-02-17 22:33:57 -08:00
netlink [GENETLINK]: Relax dances with genl_lock. 2008-02-12 22:16:33 -08:00
netrom
packet
rfkill PM: Introduce PM_EVENT_HIBERNATE callback state 2008-02-23 10:40:04 -08:00
rose
rxrpc RxRPC: fix rxrpc_recvmsg()'s returning of msg_name 2008-03-05 18:53:55 -08:00
sched [PKT_SCHED] ematch: Fix build warning. 2008-02-10 03:48:15 -08:00
sctp [SCTP]: Bring MAX_BURST socket option into ietf API extension compliance 2008-03-05 13:44:46 -08:00
sunrpc [SUNRPC]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:00:59 -08:00
tipc tipc: fix integer as NULL pointer sparse warnings in tipc 2008-02-24 18:38:31 -08:00
unix Introduce path_put() 2008-02-14 21:13:33 -08:00
wanrouter [WANROUTER]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:15:56 -08:00
wireless
x25 [X25]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:16:33 -08:00
xfrm [XFRM]: Fix ordering issue in xfrm_dst_hash_transfer(). 2008-02-17 23:29:30 -08:00
compat.c
Kconfig namespaces: mark NET_NS with "depends on NAMESPACES" 2008-02-08 09:22:23 -08:00
Makefile
nonet.c
socket.c [NET]: Make sure sockets implement splice_read 2008-02-15 02:35:45 -08:00
sysctl_net.c
TUNABLE