diff options
| author | Russ White <russ@riw.us> | 2021-04-27 16:04:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-27 16:04:24 -0400 |
| commit | d8c3daca19add1c3cedea05e9a30fb33f2b4e9ad (patch) | |
| tree | 7e2f2dfa8d5199732373bbb2c9109d514c2c4afc /zebra/zebra_mpls.c | |
| parent | 0a9fdfee679f02621fe7394d0ba50a246edde202 (diff) | |
| parent | 8283551d3c8b45264492be1f416fce11f35e177a (diff) | |
Merge pull request #8531 from mjstapp/fix_backups_misc
zebra: Misc fixups for backup nexthops
Diffstat (limited to 'zebra/zebra_mpls.c')
| -rw-r--r-- | zebra/zebra_mpls.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 6d42957b24..a923782bfe 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -2018,6 +2018,7 @@ void zebra_mpls_process_dplane_notify(struct zebra_dplane_ctx *ctx) int start_count = 0, end_count = 0; /* Installed counts */ bool changed_p = false; bool is_debug = (IS_ZEBRA_DEBUG_DPLANE | IS_ZEBRA_DEBUG_MPLS); + enum zebra_sr_policy_update_label_mode update_mode; if (is_debug) zlog_debug("LSP dplane notif, in-label %u", @@ -2091,10 +2092,21 @@ void zebra_mpls_process_dplane_notify(struct zebra_dplane_ctx *ctx) if (end_count > 0) { SET_FLAG(lsp->flags, LSP_FLAG_INSTALLED); + /* SR-TE update too */ + if (start_count == 0) + update_mode = ZEBRA_SR_POLICY_LABEL_CREATED; + else + update_mode = ZEBRA_SR_POLICY_LABEL_UPDATED; + zebra_sr_policy_label_update(lsp->ile.in_label, update_mode); + if (changed_p) dplane_lsp_notif_update(lsp, DPLANE_OP_LSP_UPDATE, ctx); } else { + /* SR-TE update too */ + zebra_sr_policy_label_update(lsp->ile.in_label, + ZEBRA_SR_POLICY_LABEL_REMOVED); + UNSET_FLAG(lsp->flags, LSP_FLAG_INSTALLED); clear_nhlfe_installed(lsp); } |
