]> git.puffer.fish Git - mirror/frr.git/commit
ospfd: Debug race condition in Segment Routing 8055/head
authorOlivier Dugeon <olivier.dugeon@orange.com>
Wed, 10 Feb 2021 18:20:24 +0000 (19:20 +0100)
committerOlivier Dugeon <olivier.dugeon@orange.com>
Thu, 11 Feb 2021 13:52:40 +0000 (14:52 +0100)
commit56981b40e910f7c20b1bd9c6d0bc05c0be1cc6ab
tree7c4b9c21b24b93d80d9cd3dd02280c6be49668d4
parentde6223a98d7cd3a38a19f0c97a8692d6ea5e17bc
ospfd: Debug race condition in Segment Routing

Issue #7926 hilight a race condition in Segment Routing processing.

The problem occurs when Router Information Opaque LSA is received late, in
particular after SPF run and after ospf_sr_nhlfe_update() was called. This
scenario is unfrequent and takes place due to a slow DR election.
In this particular case, SR Prefix are handle but not fully fill. In fact,
SRGB for the nexthop is not yet received and thus, output label could not
be computed.

When Router Information Opaque LSA is received and processed, if the
corresponding SR node is a direct neighbor of the self node, update_out_nhlfe()
is called against all SR nodes to adjust SR prefix if the next hop is the new
SR node. The function wrongly computes output label and configure a bad MPLS
LFIB entries.

Another way to hilight the problem is to change through CLI the SRGB of a node
and look to MPLS LFIB of direct neighbor, in particular those who announce
EXPLICIT NULL Prefix SID.

This patch correct the update_out_nhlfe() function by calling the appropriate
function (sr_prefix_out_label() instead of index2label()) to compute the output
label.

Some log debugs were adjusted and unused prefix route table was removed too.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
ospfd/ospf_sr.c
ospfd/ospf_sr.h
ospfd/ospf_zebra.c