Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ospf6d/ospf6_asbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,12 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
} else
ospf6_route_add_nexthop(match, ifindex, NULL);

/* Ensure adv_router is set to current router-id for self-originated routes.
* This is needed for proper self-originated route filtering when
* sending routes to zebra, especially if router-id has changed.
*/
match->path.origin.adv_router = ospf6->router_id;
match->path.origin.type = htons(OSPF6_LSTYPE_AS_EXTERNAL);
match->path.origin.id = htonl(info->id);
ospf6_handle_external_lsa_origination(ospf6, match, prefix);

Expand Down Expand Up @@ -1569,6 +1575,13 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
} else
ospf6_route_add_nexthop(route, ifindex, NULL);

/* Set adv_router to current router-id for self-originated routes.
* This is needed for proper self-originated route filtering when
* sending routes to zebra.
*/
route->path.origin.adv_router = ospf6->router_id;
route->path.origin.type = htons(OSPF6_LSTYPE_AS_EXTERNAL);

route = ospf6_route_add(route, ospf6->external_table);
ospf6_handle_external_lsa_origination(ospf6, route, prefix);

Expand Down
Loading