mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 12:39:21 +00:00
Merge pull request #2100 from chiragshah6/ospfv3_dev
ospf6d: fix ospf6 asbr crash
This commit is contained in:
commit
8a87a46d7f
@ -685,8 +685,9 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
|
|||||||
if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) {
|
if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) {
|
||||||
prefix2str(&prefix, buf, sizeof(buf));
|
prefix2str(&prefix, buf, sizeof(buf));
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s: route %s path found with nh %u to remove.",
|
"%s: route %s path found with cost %u nh %u to remove.",
|
||||||
__PRETTY_FUNCTION__, buf,
|
__PRETTY_FUNCTION__, buf,
|
||||||
|
route->path.cost,
|
||||||
listcount(o_path->nh_list));
|
listcount(o_path->nh_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -738,28 +739,37 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
|
|||||||
listcount(route->nh_list));
|
listcount(route->nh_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update RIB/FIB with effective nh_list */
|
if (listcount(route->paths)) {
|
||||||
if (ospf6->route_table->hook_add)
|
/* Update RIB/FIB with effective
|
||||||
(*ospf6->route_table->hook_add)(route);
|
* nh_list
|
||||||
|
*/
|
||||||
|
if (ospf6->route_table->hook_add)
|
||||||
|
(*ospf6->route_table->hook_add)
|
||||||
|
(route);
|
||||||
|
|
||||||
/* route's primary path is similar to LSA,
|
/* route's primary path is similar
|
||||||
* replace route's primary path with
|
* to LSA, replace route's primary
|
||||||
* route's paths list head.
|
* path with route's paths list head.
|
||||||
*/
|
*/
|
||||||
if (route->path.origin.id == lsa->header->id
|
if ((route->path.origin.id ==
|
||||||
&& route->path.origin.adv_router
|
lsa->header->id) &&
|
||||||
== lsa->header->adv_router) {
|
(route->path.origin.adv_router
|
||||||
struct ospf6_path *h_path;
|
== lsa->header->adv_router)) {
|
||||||
|
struct ospf6_path *h_path;
|
||||||
|
|
||||||
h_path = (struct ospf6_path *)
|
h_path = (struct ospf6_path *)
|
||||||
listgetdata(
|
listgetdata(
|
||||||
listhead(route->paths));
|
listhead(route->paths));
|
||||||
route->path.origin.type =
|
route->path.origin.type =
|
||||||
h_path->origin.type;
|
h_path->origin.type;
|
||||||
route->path.origin.id =
|
route->path.origin.id =
|
||||||
h_path->origin.id;
|
h_path->origin.id;
|
||||||
route->path.origin.adv_router =
|
route->path.origin.adv_router =
|
||||||
h_path->origin.adv_router;
|
h_path->origin.adv_router;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ospf6_route_remove(route,
|
||||||
|
ospf6->route_table);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user