mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 18:37:06 +00:00
zebra: handle TE policy changes in LSP async notifs
Handle SR-TE policy changes in the LSP async notification handler, as we do in the normal LSP dplane results handler. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
a082cd9a51
commit
8283551d3c
@ -2018,6 +2018,7 @@ void zebra_mpls_process_dplane_notify(struct zebra_dplane_ctx *ctx)
|
|||||||
int start_count = 0, end_count = 0; /* Installed counts */
|
int start_count = 0, end_count = 0; /* Installed counts */
|
||||||
bool changed_p = false;
|
bool changed_p = false;
|
||||||
bool is_debug = (IS_ZEBRA_DEBUG_DPLANE | IS_ZEBRA_DEBUG_MPLS);
|
bool is_debug = (IS_ZEBRA_DEBUG_DPLANE | IS_ZEBRA_DEBUG_MPLS);
|
||||||
|
enum zebra_sr_policy_update_label_mode update_mode;
|
||||||
|
|
||||||
if (is_debug)
|
if (is_debug)
|
||||||
zlog_debug("LSP dplane notif, in-label %u",
|
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) {
|
if (end_count > 0) {
|
||||||
SET_FLAG(lsp->flags, LSP_FLAG_INSTALLED);
|
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)
|
if (changed_p)
|
||||||
dplane_lsp_notif_update(lsp, DPLANE_OP_LSP_UPDATE, ctx);
|
dplane_lsp_notif_update(lsp, DPLANE_OP_LSP_UPDATE, ctx);
|
||||||
|
|
||||||
} else {
|
} 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);
|
UNSET_FLAG(lsp->flags, LSP_FLAG_INSTALLED);
|
||||||
clear_nhlfe_installed(lsp);
|
clear_nhlfe_installed(lsp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user