From 26b9d47fd2c3828e4b341dff5d968eb50c4e4fa5 Mon Sep 17 00:00:00 2001 From: Emanuele Di Pascale Date: Wed, 3 Mar 2021 10:56:51 +0100 Subject: [PATCH] ospf6d: fix setting NOAUTOCOST flag ospf6 keeps a flag to remember whether the cost for an interface was manually added via config or computed automatically, but if the configured value matches the auto-computed one we were not setting this flag, meaning that the config would not show up in the config. Signed-off-by: Emanuele Di Pascale --- ospf6d/ospf6_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index ab6a0f9639..68e67e0d43 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1327,12 +1327,11 @@ DEFUN (ipv6_ospf6_cost, return CMD_WARNING_CONFIG_FAILED; } + SET_FLAG(oi->flag, OSPF6_INTERFACE_NOAUTOCOST); if (oi->cost == lcost) return CMD_SUCCESS; oi->cost = lcost; - SET_FLAG(oi->flag, OSPF6_INTERFACE_NOAUTOCOST); - ospf6_interface_force_recalculate_cost(oi); return CMD_SUCCESS; -- 2.39.5