kernel-ark/net/ipv4
Pablo Neira Ayuso ff21d5774b [NETFILTER]: fix list traversal order in ctnetlink
Currently conntracks are inserted after the head. That means that
conntracks are sorted from the biggest to the smallest id. This happens
because we use list_prepend (list_add) instead list_add_tail. This can
result in problems during the list iteration.

                 list_for_each(i, &ip_conntrack_hash[cb->args[0]]) {
                         h = (struct ip_conntrack_tuple_hash *) i;
                         if (DIRECTION(h) != IP_CT_DIR_ORIGINAL)
                                 continue;
                         ct = tuplehash_to_ctrack(h);
                         if (ct->id <= *id)
                                 continue;

In that case just the first conntrack in the bucket will be dumped. To
fix this, we iterate the list from the tail to the head via
list_for_each_prev. Same thing for the list of expectations.

Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:40:25 -07:00
..
ipvs
netfilter [NETFILTER]: fix list traversal order in ctnetlink 2005-08-29 15:40:25 -07:00
af_inet.c [INET]: Introduce inet_sk_rebuild_header 2005-08-29 15:37:55 -07:00
ah4.c
arp.c
datagram.c
devinet.c
esp4.c
fib_frontend.c [NETLINK]: Add properly module refcounting for kernel netlink sockets. 2005-08-29 15:35:08 -07:00
fib_hash.c
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c
icmp.c
igmp.c
inet_hashtables.c [INET]: Move the TCP hashtable functions/structs to inet_hashtables.[ch] 2005-08-29 15:38:39 -07:00
inetpeer.c [IPV4]: possible cleanups 2005-08-29 15:33:20 -07:00
ip_forward.c
ip_fragment.c
ip_gre.c
ip_input.c [IPV4/6]: Check if packet was actually delivered to a raw socket to decide whether to send an ICMP unreachable 2005-08-29 15:37:22 -07:00
ip_options.c [IPV4]: possible cleanups 2005-08-29 15:33:20 -07:00
ip_output.c [INET]: Introduce inet_sk_rebuild_header 2005-08-29 15:37:55 -07:00
ip_sockglue.c
ipcomp.c
ipconfig.c [NET]: Kill skb->real_dev 2005-08-29 15:32:25 -07:00
ipip.c
ipmr.c
Kconfig [IPV4]: Fix Kconfig syntax error 2005-07-27 13:00:04 -07:00
Makefile [INET]: Move the TCP hashtable functions/structs to inet_hashtables.[ch] 2005-08-29 15:38:39 -07:00
multipath_drr.c [IPV4]: possible cleanups 2005-08-29 15:33:20 -07:00
multipath_random.c
multipath_rr.c
multipath_wrandom.c
multipath.c
netfilter.c [NETFILTER]: Move reroute-after-queue code up to the nf_queue layer. 2005-08-29 15:36:19 -07:00
proc.c
protocol.c
raw.c [IPV4/6]: Check if packet was actually delivered to a raw socket to decide whether to send an ICMP unreachable 2005-08-29 15:37:22 -07:00
route.c [IPV4]: possible cleanups 2005-08-29 15:33:20 -07:00
syncookies.c
sysctl_net_ipv4.c
tcp_bic.c
tcp_cong.c
tcp_diag.c [INET]: Just rename the TCP hashtable functions/structs to inet_ 2005-08-29 15:38:32 -07:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_input.c
tcp_ipv4.c [INET]: Move bind_hash from tcp_sk to inet_sk 2005-08-29 15:38:48 -07:00
tcp_minisocks.c [INET]: Move bind_hash from tcp_sk to inet_sk 2005-08-29 15:38:48 -07:00
tcp_output.c
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_westwood.c
tcp.c [INET]: Move bind_hash from tcp_sk to inet_sk 2005-08-29 15:38:48 -07:00
udp.c
xfrm4_input.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c [IPV4]: possible cleanups 2005-08-29 15:33:20 -07:00
xfrm4_tunnel.c