diff options
Diffstat (limited to 'ospf6d/ospf6_abr.c')
| -rw-r--r-- | ospf6d/ospf6_abr.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index ead186b6fc..1f6cc9d527 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -1200,9 +1200,23 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) listcount(old_route->nh_list)); } } else { - /* adv. router exists in the list, update the nhs */ - list_delete_all_node(o_path->nh_list); - ospf6_copy_nexthops(o_path->nh_list, route->nh_list); + struct ospf6_route *tmp_route = ospf6_route_create(); + + ospf6_copy_nexthops(tmp_route->nh_list, + o_path->nh_list); + + if (ospf6_route_cmp_nexthops(tmp_route, route) != 0) { + /* adv. router exists in the list, update nhs */ + list_delete_all_node(o_path->nh_list); + ospf6_copy_nexthops(o_path->nh_list, + route->nh_list); + ospf6_route_delete(tmp_route); + } else { + /* adv. router has no change in nhs */ + old_entry_updated = false; + ospf6_route_delete(tmp_route); + continue; + } } if (is_debug) @@ -1427,7 +1441,7 @@ void install_element_ospf6_debug_abr(void) install_element(CONFIG_NODE, &no_debug_ospf6_abr_cmd); } -static const struct ospf6_lsa_handler inter_prefix_handler = { +static struct ospf6_lsa_handler inter_prefix_handler = { .lh_type = OSPF6_LSTYPE_INTER_PREFIX, .lh_name = "Inter-Prefix", .lh_short_name = "IAP", @@ -1435,7 +1449,7 @@ static const struct ospf6_lsa_handler inter_prefix_handler = { .lh_get_prefix_str = ospf6_inter_area_prefix_lsa_get_prefix_str, .lh_debug = 0}; -static const struct ospf6_lsa_handler inter_router_handler = { +static struct ospf6_lsa_handler inter_router_handler = { .lh_type = OSPF6_LSTYPE_INTER_ROUTER, .lh_name = "Inter-Router", .lh_short_name = "IAR", |
