summaryrefslogtreecommitdiffstats
path: root/lib/mpls.h
diff options
context:
space:
mode:
authorVivek Venkatraman <vivek@cumulusnetworks.com>2017-03-09 18:55:54 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-04-06 16:32:07 +0200
commit28d58fd7b166836029656c29ad8ed9a9e8a744ac (patch)
tree549a60873cfe73d04c055447fc599e667cb1d71c /lib/mpls.h
parentbgpd: This patch implements the exchange of the BGP-Prefix-SID label index attr (diff)
downloadfrr-28d58fd7b166836029656c29ad8ed9a9e8a744ac.tar.xz
frr-28d58fd7b166836029656c29ad8ed9a9e8a744ac.zip
bgpd, lib, zebra: Implement handling of BGP-Prefix-SID label Index
Implement BGP Prefix-SID IETF draft to be able to signal a labeled-unicast prefix with a label index (segment ID). This makes it easier to deploy global MPLS labels with BGP, even without other aspects of Segment Routing implemented. This patch implements the handling of the BGP-Prefix-SID Label Index attribute. When received from a peer and the index is acceptable, the local label is picked up from the SRGB and is programmed as the incoming label as well as advertised to peers. If the index is not acceptable, no local label is assigned. The outgoing label will always be the one advertised by the downstream neighbor. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'lib/mpls.h')
-rw-r--r--lib/mpls.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/mpls.h b/lib/mpls.h
index 5a9188375..f4f360c95 100644
--- a/lib/mpls.h
+++ b/lib/mpls.h
@@ -123,6 +123,11 @@ mpls_lse_decode (mpls_lse_t lse, mpls_label_t *label,
*ttl = MPLS_LABEL_TTL(local_lse);
}
+/* Invalid label index value (when used with BGP Prefix-SID). Should
+ * match the BGP definition.
+ */
+#define MPLS_INVALID_LABEL_INDEX 0xFFFFFFFF
+
/* Printable string for labels (with consideration for reserved values). */
static inline char *