diff options
| author | Isabella de Leon <ideleon@microsoft.com> | 2023-01-10 17:58:29 -0800 |
|---|---|---|
| committer | Isabella de Leon <ideleon@microsoft.com> | 2023-02-28 11:39:12 -0800 |
| commit | 7c4755176342ae490e1372902c2455d34153067e (patch) | |
| tree | cfd694e03abe33a274d26cc734ac57a10fab3cfb /isisd/isis_circuit.c | |
| parent | d74f913c5f487a722b19bd01442b8fe13c4714e8 (diff) | |
isisd: Add advertise high metrics base functionality
Implement advertise-high-metrics set function - when advertise-high-metrics is configured, iterate through each isis interface and update each metric to its high metric value. When advertise-high-metrics is disabled, revert each interface's metric to its originally configured value.
Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
Diffstat (limited to 'isisd/isis_circuit.c')
| -rw-r--r-- | isisd/isis_circuit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index dd5f921bef..8644da2f08 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -1499,6 +1499,10 @@ ferr_r isis_circuit_metric_set(struct isis_circuit *circuit, int level, return ferr_cfg_invalid("metric %d too large for narrow metric", metric); + /* Don't modify metric if advertise high metrics is configured */ + if (circuit->area && circuit->area->advertise_high_metrics) + return ferr_ok(); + /* inform ldp-sync of metric change * if ldp-sync is running need to save metric * and restore new values after ldp-sync completion. |
