Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ospfd: Correct invalid SR-MPLS output label #17495

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

odd22
Copy link
Member

@odd22 odd22 commented Nov 23, 2024

When OSPFd starts, there is 2 possible scenarios for Segment Routing: 1/ Routes associated to Prefixes are not yet available i.e. Segment Routing LSA are received before LSA Type 1. In this case, the function ospf_sr_nhlfe_update() is triggered when a new SPF is launch. Thus, neighbors and output label are always synchronise with the routing table. 2/ Routes are already available i.e. LSA Type 1 are received before Segment Routing LSA, in particular the Router Information which contains the SRGB. During nhlfe computation, perfixes are leave with incomplete configuration, in particular, the SR nexthop is set to NULL. If this scenario is handle through the function update_out_nhlfe (triggered when SRGB is received or modified from a neighbor node), the output label is not correctly configured as the nexthop SR node associated to the prefix has been leave to NULL.

This patch correct this problem by calling the function compute_nhlfe() when the nexthop SR Node associated to the prefix is NULL within the update_out_nhlfe() function. Thus, we guarantee that the SR prefix is always correctly configuration indpedently of the scenario i.e. arrival of the different LSA.

When OSPFd starts, there is 2 possible scenarios for Segment Routing:
1/ Routes associated to Prefixes are not yet available i.e. Segment Routing LSA
are received before LSA Type 1. In this case, the function
ospf_sr_nhlfe_update() is triggered when a new SPF is launch. Thus, neighbors
and output label are always synchronise with the routing table.
2/ Routes are already available i.e. LSA Type 1 are received before Segment
Routing LSA, in particular the Router Information which contains the SRGB.
During nhlfe computation, perfixes are leave with incomplete configuration, in
particular, the SR nexthop is set to NULL. If this scenario is handle through
the function update_out_nhlfe (triggered when SRGB is received or modified from
a neighbor node), the output label is not correctly configured as the nexthop
SR node associated to the prefix has been leave to NULL.

This patch correct this problem by calling the function compute_nhlfe() when
the nexthop SR Node associated to the prefix is NULL within the
update_out_nhlfe() function. Thus, we guarantee that the SR prefix is always
correctly configuration indpedently of the scenario i.e. arrival of the
different LSA.

Signed-off-by: Olivier Dugeon <[email protected]>
Copy link
Contributor

@cscarpitta cscarpitta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@donaldsharp donaldsharp merged commit a7b25c4 into FRRouting:master Nov 24, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants