summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-08-04 19:12:57 -0300
committerGitHub <noreply@github.com>2020-08-04 19:12:57 -0300
commit3b59710cf9b74f7635c7fb1ba9ba3dc029399cae (patch)
tree1b416dea1595d3439594ca8d24711ce5aca6ccfb /zebra/zebra_mpls.c
parent7dee45ef80d6d659815258b71c16c0ea39cd7f8b (diff)
parent301a687af6be8c3b7d95fa443100e8867eda2005 (diff)
Merge pull request #6857 from mjstapp/fix_lsp_backup_update
zebra: reset LSP backup nh info on update
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index f905036323..1ac7bc7a2a 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -3321,7 +3321,7 @@ lsp_add_nhlfe(zebra_lsp_t *lsp, enum lsp_types_t type,
/*
* Install an LSP and forwarding entry; used primarily
- * from zapi message processing.
+ * from vrf zapi message processing.
*/
int mpls_lsp_install(struct zebra_vrf *zvrf, enum lsp_types_t type,
mpls_label_t in_label, uint8_t num_out_labels,
@@ -3381,6 +3381,10 @@ static int lsp_znh_install(zebra_lsp_t *lsp, enum lsp_types_t type,
memcpy(nhlfe->nexthop->backup_idx, znh->backup_idx,
znh->backup_num);
SET_FLAG(nhlfe->nexthop->flags, NEXTHOP_FLAG_HAS_BACKUP);
+ } else {
+ /* Ensure there's no stale backup info */
+ UNSET_FLAG(nhlfe->nexthop->flags, NEXTHOP_FLAG_HAS_BACKUP);
+ nhlfe->nexthop->backup_num = 0;
}
/* Queue LSP for processing. */