diff options
| author | Alexander Chernavin <achernavin@netgate.com> | 2023-07-19 12:03:46 +0000 |
|---|---|---|
| committer | Alexander Chernavin <achernavin@netgate.com> | 2023-07-19 13:12:40 +0000 |
| commit | b1f759133b6b909dde73f474f3411fc569fff16d (patch) | |
| tree | 83d584f177ce11c455ae5f1817b3778f8af35d2b /ospfd/ospf_vty.c | |
| parent | 58560337776556c1a2d8ed3578f6b51e4621fe22 (diff) | |
ospfd: fix default-metric change if external LSAs already sent
Currently, when redistribution of routes was configured, external LSAs
were already advertised to peers, and then default-metric is changed,
external LSAs refresh will not occur. In other words, the peers will not
receive the refreshed external LSAs with the new metric.
With this fix, changing default-metric will cause external LSAs to be
refreshed and flooded.
There is a similar task to refresh external LSAs when NSSA settings are
changed. And there is a function that accomplishes it -
ospf_schedule_asbr_nssa_redist_update(). Since the function does the
general work of refreshing external LSAs and is not specific to NSSA
settings, the idea is to give it a more general name and call it when
default-metric changes in order to fix the problem.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Diffstat (limited to 'ospfd/ospf_vty.c')
| -rw-r--r-- | ospfd/ospf_vty.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index a23802719b..31982aa0e5 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -1529,7 +1529,7 @@ DEFPY (ospf_area_nssa, /* Flush the external LSA for the specified area */ ospf_flush_lsa_from_area(ospf, area_id, OSPF_AS_EXTERNAL_LSA); ospf_schedule_abr_task(ospf); - ospf_schedule_asbr_nssa_redist_update(ospf); + ospf_schedule_asbr_redist_update(ospf); return CMD_SUCCESS; } @@ -9619,6 +9619,8 @@ DEFUN (ospf_default_metric, ospf->default_metric = metric; + ospf_schedule_asbr_redist_update(ospf); + return CMD_SUCCESS; } @@ -9633,6 +9635,8 @@ DEFUN (no_ospf_default_metric, ospf->default_metric = -1; + ospf_schedule_asbr_redist_update(ospf); + return CMD_SUCCESS; } |
