diff options
author | paul <paul> | 2003-07-24 23:22:57 +0000 |
---|---|---|
committer | paul <paul> | 2003-07-24 23:22:57 +0000 |
commit | 736d3441e267c76056d6fcc2f59cd09a90f3af21 (patch) | |
tree | e5ab36856be58c03bcec234916dfa52aabc38441 /ospfd/ospf_packet.c | |
parent | 7021c425a9f5bd9f62b934124becbaadd961cac0 (diff) |
2003-07-25 kamatchi soundaram <kamatchi@tdd.sj.nec.com>
* ospf_packet.c (ospf_ls_upd_send_queue_event): get next route
node in body of the loop to avoid chance that route node
is unlocked and deleted before the next iteration tries to
get next route node.
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 9e4be062..a0a9931c 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -3113,19 +3113,23 @@ ospf_ls_upd_send_queue_event (struct thread *thread) { struct ospf_interface *oi = THREAD_ARG(thread); struct route_node *rn; + struct route_node *rnext; oi->t_ls_upd_event = NULL; if (IS_DEBUG_OSPF_EVENT) zlog_info ("ospf_ls_upd_send_queue start"); - for (rn = route_top (oi->ls_upd_queue); rn; rn = route_next (rn)) + for (rn = route_top (oi->ls_upd_queue); rn; rn = rnext) { + + rnext = route_next (rn); + if (rn->info == NULL) - continue; + continue; while (!list_isempty ((list)rn->info)) - ospf_ls_upd_queue_send (oi, rn->info, rn->p.u.prefix4); + ospf_ls_upd_queue_send (oi, rn->info, rn->p.u.prefix4); list_delete (rn->info); rn->info = NULL; |