aboutsummaryrefslogtreecommitdiff
path: root/include/net/inet_hashtables.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@eurodev.net>2005-08-09 20:06:42 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 15:40:25 -0700
commitff21d5774b4a186c98be6398eacde75d896db804 (patch)
treef2b1da2cec09742fd9b5e90479e2ebb2068ea1e8 /include/net/inet_hashtables.h
parent28b19d99ac6d92e4fb2fe34144c495019a638a64 (diff)
[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>
Diffstat (limited to 'include/net/inet_hashtables.h')
0 files changed, 0 insertions, 0 deletions