]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospf6d: fix issue when displaying the redistribute command
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 6 Sep 2021 22:51:46 +0000 (19:51 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 21 Sep 2021 20:43:45 +0000 (17:43 -0300)
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>
ospf6d/ospf6_asbr.c

index 5a7023126dc80680b6a3e4584cae2b0f665450ee..b47f0ca169db56e1b9c3e58687585f2a88eb7b1c 100644 (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));