zebra: add boolean to control pw reachability checking

Add a boolean to control whether pseudowire reachability
checking needs to be strict.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
Mark Stapp 2021-06-10 16:49:56 -04:00
parent bc77c3bb8a
commit 6fb3580882
3 changed files with 6 additions and 0 deletions

View File

@ -54,6 +54,7 @@ DEFINE_MTYPE_STATIC(ZEBRA, FEC, "MPLS FEC object");
DEFINE_MTYPE_STATIC(ZEBRA, NHLFE, "MPLS nexthop object");
int mpls_enabled;
bool mpls_pw_reach_strict; /* Strict reachability checking */
/* static function declarations */
@ -3977,6 +3978,7 @@ void zebra_mpls_init_tables(struct zebra_vrf *zvrf)
void zebra_mpls_init(void)
{
mpls_enabled = 0;
mpls_pw_reach_strict = false;
if (mpls_kernel_init() < 0) {
flog_warn(EC_ZEBRA_MPLS_SUPPORT_DISABLED,

View File

@ -576,6 +576,7 @@ static inline int mpls_should_lsps_be_processed(struct route_node *rn)
/* Global variables. */
extern int mpls_enabled;
extern bool mpls_pw_reach_strict; /* Strict pseudowire reachability checking */
#ifdef __cplusplus
}

View File

@ -458,6 +458,9 @@ int mpls_kernel_init(void)
kr_state.rtseq = 1;
/* Strict pseudowire reachability checking required for obsd */
mpls_pw_reach_strict = true;
return 0;
}