diff -u -r1.10 -r1.10.2.1 --- linux-2.4.x/net/ipv4/netfilter/ip_conntrack_pptp.c 29 Nov 2002 06:37:32 -0000 1.10 +++ linux-2.4.x/net/ipv4/netfilter/ip_conntrack_pptp.c 4 Feb 2003 07:10:46 -0000 1.10.2.1 @@ -96,16 +96,19 @@ /* timeout GRE data connections */ static int pptp_timeout_related(struct ip_conntrack *ct) { - struct list_head *cur_item; + struct list_head *cur_item, *next; struct ip_conntrack_expect *exp; /* FIXME: do we have to lock something ? */ - list_for_each(cur_item, &ct->sibling_list) { + for (cur_item = ct->sibling_list.next; + cur_item != &ct->sibling_list; cur_item = next) { + next = cur_item->next; exp = list_entry(cur_item, struct ip_conntrack_expect, expected_list); if (!exp->sibling) { ip_ct_gre_keymap_destroy(exp); + ip_conntrack_unexpect_related(exp); continue; } @@ -319,7 +322,6 @@ /* untrack this call id, unexpect GRE packets */ pptp_timeout_related(ct); - /* NEWNAT: look up exp for call id and unexpct_related */ break; case PPTP_WAN_ERROR_NOTIFY: @@ -481,8 +483,6 @@ /* untrack this call id, unexpect GRE packets */ pptp_timeout_related(ct); - /* no need to call unexpect_related since master conn - * dies anyway */ }