diff options
author | Vivek Venkatraman <vivek@cumulusnetworks.com> | 2017-03-09 18:55:54 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-04-06 16:32:07 +0200 |
commit | 28d58fd7b166836029656c29ad8ed9a9e8a744ac (patch) | |
tree | 549a60873cfe73d04c055447fc599e667cb1d71c /lib/mpls.h | |
parent | bgpd: This patch implements the exchange of the BGP-Prefix-SID label index attr (diff) | |
download | frr-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.h | 5 |
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 * |