dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/net/ipv4/netfilter
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
..
Kconfig [NETFILTER]: Add "nfnetlink_queue" netfilter queue handler over nfnetlink 2005-08-29 15:36:56 -07:00
Makefile [NETFILTER]: Add "nfnetlink_queue" netfilter queue handler over nfnetlink 2005-08-29 15:36:56 -07:00
arp_tables.c
arpt_mangle.c
arptable_filter.c
ip_conntrack_amanda.c [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_conntrack_core.c [NETFILTER]: fix conntrack refcount leak in unlink_expect() 2005-08-29 15:40:17 -07:00
ip_conntrack_ftp.c [NETFILTER]: connection tracking event notifiers 2005-08-29 15:31:24 -07:00
ip_conntrack_irc.c [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_conntrack_netlink.c [NETFILTER]: fix list traversal order in ctnetlink 2005-08-29 15:40:25 -07:00
ip_conntrack_proto_generic.c
ip_conntrack_proto_icmp.c [NETFILTER]: Extend netfilter logging API 2005-08-29 15:38:07 -07:00
ip_conntrack_proto_sctp.c [NETFILTER]: Add ctnetlink subsystem 2005-08-29 15:31:49 -07:00
ip_conntrack_proto_tcp.c [NETFILTER]: Extend netfilter logging API 2005-08-29 15:38:07 -07:00
ip_conntrack_proto_udp.c [NETFILTER]: Extend netfilter logging API 2005-08-29 15:38:07 -07:00
ip_conntrack_standalone.c [NETFILTER]: Fix multiple problems with the conntrack event cache 2005-08-29 15:38:54 -07:00
ip_conntrack_tftp.c [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_nat_amanda.c [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_nat_core.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ip_nat_ftp.c [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_nat_helper.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ip_nat_irc.c [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_nat_proto_icmp.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ip_nat_proto_tcp.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ip_nat_proto_udp.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ip_nat_proto_unknown.c [NETFILTER]: C99 initizalizers for NAT protocols 2005-08-29 15:33:34 -07:00
ip_nat_rule.c
ip_nat_snmp_basic.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ip_nat_standalone.c [NETFILTER]: Add ctnetlink subsystem 2005-08-29 15:31:49 -07:00
ip_nat_tftp.c [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_queue.c [NETFILTER]: Core changes required by upcoming nfnetlink_queue code 2005-08-29 15:36:49 -07:00
ip_tables.c [NETFILTER]: reduce netfilter sk_buff enlargement 2005-08-29 15:31:04 -07:00
ipt_CLASSIFY.c [NETFILTER]: reduce netfilter sk_buff enlargement 2005-08-29 15:31:04 -07:00
ipt_CLUSTERIP.c [NETFILTER]: convert nfmark and conntrack mark to 32bit 2005-08-29 15:29:31 -07:00
ipt_CONNMARK.c [NETFILTER]: reduce netfilter sk_buff enlargement 2005-08-29 15:31:04 -07:00
ipt_DSCP.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ipt_ECN.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ipt_LOG.c [NETFILTER]: Extend netfilter logging API 2005-08-29 15:38:07 -07:00
ipt_MARK.c [NETFILTER]: reduce netfilter sk_buff enlargement 2005-08-29 15:31:04 -07:00
ipt_MASQUERADE.c
ipt_NETMAP.c
ipt_NFQUEUE.c [NETFILTER]: Add "nfnetlink_queue" netfilter queue handler over nfnetlink 2005-08-29 15:36:56 -07:00
ipt_NOTRACK.c
ipt_REDIRECT.c
ipt_REJECT.c [NETFILTER]: reduce netfilter sk_buff enlargement 2005-08-29 15:31:04 -07:00
ipt_SAME.c
ipt_TCPMSS.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ipt_TOS.c [NETFILTER]: Rename skb_ip_make_writable() to skb_make_writable() 2005-08-29 15:34:40 -07:00
ipt_ULOG.c [NETFILTER]: Extend netfilter logging API 2005-08-29 15:38:07 -07:00
ipt_addrtype.c
ipt_ah.c
ipt_comment.c
ipt_connmark.c [NETFILTER]: convert nfmark and conntrack mark to 32bit 2005-08-29 15:29:31 -07:00
ipt_conntrack.c
ipt_dscp.c
ipt_ecn.c
ipt_esp.c
ipt_hashlimit.c
ipt_helper.c
ipt_iprange.c
ipt_length.c
ipt_limit.c
ipt_mac.c
ipt_mark.c [NETFILTER]: convert nfmark and conntrack mark to 32bit 2005-08-29 15:29:31 -07:00
ipt_multiport.c
ipt_owner.c
ipt_physdev.c
ipt_pkttype.c
ipt_realm.c
ipt_recent.c
ipt_sctp.c
ipt_state.c
ipt_tcpmss.c
ipt_tos.c
ipt_ttl.c
iptable_filter.c
iptable_mangle.c
iptable_raw.c