--- embedaddon/quagga/ospfd/ospf_asbr.c 2012/10/09 09:22:29 1.1.1.2 +++ embedaddon/quagga/ospfd/ospf_asbr.c 2016/11/02 10:09:12 1.1.1.3 @@ -44,7 +44,7 @@ #include "ospfd/ospf_zebra.h" #include "ospfd/ospf_dump.h" - + /* Remove external route. */ void ospf_external_route_remove (struct ospf *ospf, struct prefix_ipv4 *p) @@ -96,7 +96,7 @@ ospf_external_route_lookup (struct ospf *ospf, return NULL; } - + /* Add an External info for AS-external-LSA. */ struct external_info * ospf_external_info_new (u_char type) @@ -122,6 +122,7 @@ ospf_reset_route_map_set_values (struct route_map_set_ { values->metric = -1; values->metric_type = -1; + values->nexthop.s_addr = -1; } int @@ -135,7 +136,7 @@ ospf_route_map_set_compare (struct route_map_set_value /* Add an External info for AS-external-LSA. */ struct external_info * ospf_external_info_add (u_char type, struct prefix_ipv4 p, - unsigned int ifindex, struct in_addr nexthop) + ifindex_t ifindex, struct in_addr nexthop) { struct external_info *new; struct route_node *rn; @@ -164,7 +165,8 @@ ospf_external_info_add (u_char type, struct prefix_ipv new->nexthop = nexthop; new->tag = 0; - rn->info = new; + if (rn) + rn->info = new; if (IS_DEBUG_OSPF (lsa, LSA_GENERATE)) zlog_debug ("Redistribute[%s]: %s/%d external info created.", @@ -233,7 +235,7 @@ ospf_external_info_find_lsa (struct ospf *ospf, return lsa; } - + /* Update ASBR status. */ void ospf_asbr_status_update (struct ospf *ospf, u_char status) @@ -263,7 +265,7 @@ ospf_asbr_status_update (struct ospf *ospf, u_char sta } /* Transition from/to status ASBR, schedule timer. */ - ospf_spf_calculate_schedule (ospf); + ospf_spf_calculate_schedule (ospf, SPF_FLAG_ASBR_STATUS_CHANGE); ospf_router_lsa_update (ospf); }