diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2020-09-11 15:55:04 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-11 15:55:04 -0300 |
| commit | beb91114ec5fcfa2bca1c7c1358b39c6640aec4c (patch) | |
| tree | 2ded0df0de56d9e251e1b1abf6e81d364e35570a /ospfd/ospf_interface.c | |
| parent | a77bd0f4e6b7d63e6f66288d7ea715ae8c55feee (diff) | |
| parent | 1cbf96a8adf020ce6107ce26fb065d44373e14ce (diff) | |
Merge pull request #6789 from volta-networks/feat_ldp_igp_sync
ldpd: Add support for LDP-IGP Synchronization
Diffstat (limited to 'ospfd/ospf_interface.c')
| -rw-r--r-- | ospfd/ospf_interface.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index af801da8d7..adc3037598 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -32,6 +32,7 @@ #include "log.h" #include "zclient.h" #include "bfd.h" +#include "ldp_sync.h" #include "ospfd/ospfd.h" #include "ospfd/ospf_spf.h" @@ -46,6 +47,7 @@ #include "ospfd/ospf_abr.h" #include "ospfd/ospf_network.h" #include "ospfd/ospf_dump.h" +#include "ospfd/ospf_ldp_sync.h" DEFINE_QOBJ_TYPE(ospf_interface) DEFINE_HOOK(ospf_vl_add, (struct ospf_vl_data * vd), (vd)) @@ -81,6 +83,12 @@ int ospf_if_get_output_cost(struct ospf_interface *oi) uint32_t cost; uint32_t bw, refbw; + /* if LDP-IGP Sync is running on interface set cost so interface + * is used only as last resort + */ + if (ldp_sync_if_is_enabled(IF_DEF_PARAMS(oi->ifp)->ldp_sync_info)) + return (LDP_OSPF_LSINFINITY); + /* ifp speed and bw can be 0 in some platforms, use ospf default bw if bw is configured under interface it would be used. */ @@ -539,6 +547,7 @@ void ospf_del_if_params(struct ospf_if_params *oip) { list_delete(&oip->auth_crypt); bfd_info_free(&(oip->bfd_info)); + ldp_sync_info_free(&(oip->ldp_sync_info)); XFREE(MTYPE_OSPF_IF_PARAMS, oip); } |
