summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index 977c84d4dd..15e5c330e4 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -1311,10 +1311,12 @@ mpls_ftn_update (int add, struct zebra_vrf *zvrf, enum lsp_types_t type,
return -1;
found:
- if (add)
+ if (add && nexthop->nh_label_type == ZEBRA_LSP_NONE)
nexthop_add_labels (nexthop, type, 1, &out_label);
- else
+ else if (!add && nexthop->nh_label_type == type)
nexthop_del_labels (nexthop);
+ else
+ return 0;
SET_FLAG (rib->status, RIB_ENTRY_CHANGED);
SET_FLAG (rib->status, RIB_ENTRY_NEXTHOPS_CHANGED);