summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-05-10 14:23:47 -0400
committerGitHub <noreply@github.com>2023-05-10 14:23:47 -0400
commitdcaac2a2a559c80ba13b5a38a98438d101e0cad7 (patch)
tree26c6d585875ca3d992fcfeaa00f7e9666449420f /ospfd/ospf_interface.c
parent183dabba65ec90ebcc1a367a20bb7376a34f8e02 (diff)
parentb9c56b644d6beed1354aea9f9a75c29196bf2e33 (diff)
Merge pull request #13501 from FRRouting/mergify/bp/stable/8.4/pr-13485
ospfd: Respect loopback's cost that is set and set loopback costs to 0 (backport #13485)
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 61497cdb9c..f71d222e98 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -115,6 +115,9 @@ int ospf_if_get_output_cost(struct ospf_interface *oi)
cost = 1;
else if (cost > 65535)
cost = 65535;
+
+ if (if_is_loopback(oi->ifp))
+ cost = 0;
}
return cost;