From 6fb3580882bef9cf94aa69a4b202eb9ea5307898 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Thu, 10 Jun 2021 16:49:56 -0400 Subject: [PATCH] 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 --- zebra/zebra_mpls.c | 2 ++ zebra/zebra_mpls.h | 1 + zebra/zebra_mpls_openbsd.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 850ca1763..a4576b310 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -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, diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h index dd2d2e565..7059d393e 100644 --- a/zebra/zebra_mpls.h +++ b/zebra/zebra_mpls.h @@ -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 } diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c index b767929dc..74b1e3727 100644 --- a/zebra/zebra_mpls_openbsd.c +++ b/zebra/zebra_mpls_openbsd.c @@ -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; } -- 2.39.5