diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2022-02-16 17:26:53 +0100 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2022-03-25 15:18:34 +0100 |
| commit | 7bd1ec94906d6cf0409d0fd34ef2eaac2c49651d (patch) | |
| tree | 3c8ab788d0d075adeccc00d832d01c23a676456c /ospfd/ospf_sr.c | |
| parent | 052a0cd0257f751cc1fec4d3972b179916ae9c63 (diff) | |
ospfd: show running-config displays also srgb on some cases
The following configuration:
router ospf
segment-routing global-block 16000 23999 local-block 1000 2000
!
appears in the 'show running-config' like below:
router ospf
local-block 1000 2000
!
When there are custom Adjacencies, display the SRGB even if SRGB
has the default settings.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'ospfd/ospf_sr.c')
| -rw-r--r-- | ospfd/ospf_sr.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index 21978d35ce..b5dbc4a5a9 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -2053,11 +2053,15 @@ void ospf_sr_config_write_router(struct vty *vty) vty_out(vty, " segment-routing global-block %u %u", OspfSR.srgb.start, upper); - if ((OspfSR.srlb.start != DEFAULT_SRLB_LABEL) - || (OspfSR.srlb.end != DEFAULT_SRLB_END)) + if ((OspfSR.srlb.start != DEFAULT_SRLB_LABEL) || + (OspfSR.srlb.end != DEFAULT_SRLB_END)) { + if ((OspfSR.srgb.start == DEFAULT_SRGB_LABEL) && + (OspfSR.srgb.size == DEFAULT_SRGB_SIZE)) + vty_out(vty, " segment-routing global-block %u %u", + OspfSR.srgb.start, upper); vty_out(vty, " local-block %u %u\n", OspfSR.srlb.start, OspfSR.srlb.end); - else + } else vty_out(vty, "\n"); if (OspfSR.msd != 0) |
