summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_zebra.c
diff options
context:
space:
mode:
authorChris Hall <chris.hall@highwayman.com>2011-03-29 00:29:35 +0100
committerChris Hall <chris.hall@highwayman.com>2011-03-29 00:29:35 +0100
commite20f7ccd9e110fcd5deb945f8d23922efd8b0822 (patch)
tree89b61ee61ac306817dc19b9313806bf2562b1c1b /ospfd/ospf_zebra.c
parent6481583be322b0ba223a0140500a0a6d50546dd9 (diff)
downloadquagga-ex14.tar.bz2
quagga-ex14.tar.xz
Bring "ex" version up to date with 0.99.18ex14
Release: 0.99.18ex14 Also fixes issue with unknown attributes -- does not release them prematurely. Contains the "bgpd: New show commands for improved view and address family support", which is post 0.99.18. (But not RFC 5082 GTSM.)
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r--ospfd/ospf_zebra.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 72f0ede4..0a486199 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -930,14 +930,9 @@ ospf_distribute_list_update_timer (struct thread *thread)
struct external_info *ei;
struct route_table *rt;
struct ospf_lsa *lsa;
- intptr_t type;
+ int type, default_refresh = 0;
struct ospf *ospf;
- type = (intptr_t)THREAD_ARG (thread);
- assert (type <= ZEBRA_ROUTE_MAX);
-
- rt = EXTERNAL_INFO (type);
-
ospf = ospf_lookup ();
if (ospf == NULL)
return 0;
@@ -947,17 +942,24 @@ ospf_distribute_list_update_timer (struct thread *thread)
zlog_info ("Zebra[Redistribute]: distribute-list update timer fired!");
/* foreach all external info. */
- if (rt)
- for (rn = route_top (rt); rn; rn = route_next (rn))
- if ((ei = rn->info) != NULL)
- {
- if (is_prefix_default (&ei->p))
- ospf_external_lsa_refresh_default (ospf);
- else if ((lsa = ospf_external_info_find_lsa (ospf, &ei->p)))
- ospf_external_lsa_refresh (ospf, lsa, ei, LSA_REFRESH_IF_CHANGED);
- else
- ospf_external_lsa_originate (ospf, ei);
- }
+ for (type = 0; type <= ZEBRA_ROUTE_MAX; type++)
+ {
+ rt = EXTERNAL_INFO (type);
+ if (!rt)
+ continue;
+ for (rn = route_top (rt); rn; rn = route_next (rn))
+ if ((ei = rn->info) != NULL)
+ {
+ if (is_prefix_default (&ei->p))
+ default_refresh = 1;
+ else if ((lsa = ospf_external_info_find_lsa (ospf, &ei->p)))
+ ospf_external_lsa_refresh (ospf, lsa, ei, LSA_REFRESH_IF_CHANGED);
+ else
+ ospf_external_lsa_originate (ospf, ei);
+ }
+ }
+ if (default_refresh)
+ ospf_external_lsa_refresh_default (ospf);
return 0;
}
@@ -974,9 +976,9 @@ ospf_distribute_list_update (struct ospf *ospf, int type)
if (!(rt = EXTERNAL_INFO (type)))
return;
- /* If exists previously invoked thread, then cancel it. */
+ /* If exists previously invoked thread, then let it continue. */
if (ospf->t_distribute_update)
- OSPF_TIMER_OFF (ospf->t_distribute_update);
+ return;
/* Set timer. */
pi = type ;