From 16727fd7eb1b99d7a3891a69b75abb8191b6887f Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 6 Sep 2021 19:51:46 -0300 Subject: [PATCH] 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 --- ospf6d/ospf6_asbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 5a7023126..b47f0ca16 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -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)); -- 2.39.2