ospf6d: fix issue when displaying the redistribute command

When set to its default value, the metric type associated to a
"redistribute" statement shouldn't be displayed as part of the
running configuration.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2021-09-06 19:51:46 -03:00
parent 242a9767f7
commit 16727fd7eb

View File

@ -1787,7 +1787,7 @@ int ospf6_redistribute_config_write(struct vty *vty, struct ospf6 *ospf6)
vty_out(vty, " redistribute %s", ZROUTE_NAME(type));
if (red->dmetric.value >= 0)
vty_out(vty, " metric %d", red->dmetric.value);
if (red->dmetric.type != DEFAULT_METRIC_TYPE)
if (red->dmetric.type == 1)
vty_out(vty, " metric-type 1");
if (ROUTEMAP_NAME(red))
vty_out(vty, " route-map %s", ROUTEMAP_NAME(red));