Skip to content

Commit

Permalink
zebra: add boolean to control pw reachability checking
Browse files Browse the repository at this point in the history
Add a boolean to control whether pseudowire reachability
checking needs to be strict.

Signed-off-by: Mark Stapp <[email protected]>
  • Loading branch information
Mark Stapp committed Jun 11, 2021
1 parent bc77c3b commit 6fb3580
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zebra/zebra_mpls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions zebra/zebra_mpls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 3 additions & 0 deletions zebra/zebra_mpls_openbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6fb3580

Please sign in to comment.