]> git.proxmox.com Git - mirror_frr.git/commit
lib: Correct bug for TE metric wrong assignement
authorOlivier Dugeon <olivier.dugeon@orange.com>
Mon, 24 Jan 2022 16:09:29 +0000 (17:09 +0100)
committerOlivier Dugeon <olivier.dugeon@orange.com>
Wed, 2 Feb 2022 16:04:12 +0000 (17:04 +0100)
commit538f34cb203f7a8f064df01084016ebe54af797b
tree101aaa5ca2b7d6ad4ba8c37456dfa369e54fc34d
parent3d1ff4bfdb159583a62e72ccb359a8508c4cbb2e
lib: Correct bug for TE metric wrong assignement

When link-param is enabled for a given interface, TE metric is automatically
assigned to the metric of the interface. However, the metric of the interface
could be unassigned and keep the default value equal to 0. Thus, if the TE
metric is not explicitely modified within the `link-param metric` statement,
TE metric remains set to 0 which is not a valid value especially when
computing constrainted path.

This patch changes the assignement of the default value of the TE metric.
It is set to the metric of the interface only if the latter is not equal to 0.
TE topotests for OSPF and IS-IS have been adjusted accordingly.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
14 files changed:
lib/if.c
tests/topotests/isis_te_topo1/reference/ted_step1.json
tests/topotests/isis_te_topo1/reference/ted_step2.json
tests/topotests/isis_te_topo1/reference/ted_step3.json
tests/topotests/isis_te_topo1/reference/ted_step4.json
tests/topotests/isis_te_topo1/reference/ted_step5.json
tests/topotests/isis_te_topo1/reference/ted_step6.json
tests/topotests/ospf_te_topo1/reference/ted_step1.json
tests/topotests/ospf_te_topo1/reference/ted_step2.json
tests/topotests/ospf_te_topo1/reference/ted_step3.json
tests/topotests/ospf_te_topo1/reference/ted_step4.json
tests/topotests/ospf_te_topo1/reference/ted_step5.json
tests/topotests/ospf_te_topo1/reference/ted_step6.json
tests/topotests/ospf_te_topo1/reference/ted_step7.json