diff options
author | Olivier Dugeon <olivier.dugeon@orange.com> | 2021-03-09 11:00:32 +0100 |
---|---|---|
committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2021-03-09 11:14:32 +0100 |
commit | 270e66a2ceaeca0e6e3fde0150c36e2252de641f (patch) | |
tree | c2ebe5567287791e4e2c301e107b6f98da9dad11 /ospfd/ospf_ext.c | |
parent | Merge pull request #8180 from kuldeepkash/topojson_framework (diff) | |
download | frr-270e66a2ceaeca0e6e3fde0150c36e2252de641f.tar.xz frr-270e66a2ceaeca0e6e3fde0150c36e2252de641f.zip |
ospfd: Correct Segment Routing prefix bugs
This patch solves 2 Segment Routing prefix bugs:
- If Segment Routing is not enabled in the initial configuration, Extended
Prefix Opaque LSA is not flood. This is due to a control flag which is
set only when Segment Routing is enabled at startup and not latter.
- Attempting to modify Segment Routing prefix flag e.g. adding or removing
no-php or explicit-null flag, doesn't work as expected: Corresponding entry
in the MPLS table is not updated, Extended Prefix Opaque LSA carry wrong flag
value, and neighbor set a wrong configuration in the MPLS table for this
Segment Routing prefix.
The first bug is corrected in ospfd/ospf_ext.c:
- Flag setting is moved from ospf_ext_ism_change() to set_ext_prefix() function
The seconf one is corrected in ospfd/ospf_sr.c:
- For self node, previous MPLS entry is removed if needed and flag reset before
setting the new Segment Routing prefix configuration
- For neighbor node, srnext field of sr_prefix structure is always set and not
only for new SR Prefix.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_ext.c')
-rw-r--r-- | ospfd/ospf_ext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c index 4fa61221a..754e2bcba 100644 --- a/ospfd/ospf_ext.c +++ b/ospfd/ospf_ext.c @@ -301,6 +301,8 @@ static void set_ext_prefix(struct ext_itf *exti, uint8_t route_type, exti->prefix.af = 0; exti->prefix.pref_length = p.prefixlen; exti->prefix.address = p.prefix; + + SET_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE); } /* Extended Link TLV - RFC7684 section 3.1 */ @@ -766,7 +768,6 @@ static void ospf_ext_ism_change(struct ospf_interface *oi, int old_status) if (OspfEXT.enabled) { osr_debug("EXT (%s): Set Prefix SID to interface %s ", __func__, oi->ifp->name); - exti->flags = EXT_LPFLG_LSA_ACTIVE; ospf_sr_update_local_prefix(oi->ifp, oi->address); } } else { |