summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_label.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2017-06-20 21:53:27 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2017-06-20 21:53:27 +0200
commitbf468c3ca5d96af40ba4af4967ec3e48fdf76447 (patch)
treea7aebb4e423c9e2c6bece888423580953f0353b3 /bgpd/bgp_label.c
parentbgpd: Install SAFI_LABELED_UNICAST routes in SAFI_UNICAST table (diff)
downloadfrr-bf468c3ca5d96af40ba4af4967ec3e48fdf76447.tar.xz
frr-bf468c3ca5d96af40ba4af4967ec3e48fdf76447.zip
bgpd: Install SAFI_LABELED_UNICAST routes in SAFI_UNICAST table
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_label.c')
-rw-r--r--bgpd/bgp_label.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/bgpd/bgp_label.c b/bgpd/bgp_label.c
index adeaa7f3b..fc0654f18 100644
--- a/bgpd/bgp_label.c
+++ b/bgpd/bgp_label.c
@@ -177,7 +177,7 @@ bgp_nlri_get_labels (struct peer *peer, u_char *pnt, u_char plen, mpls_label_t *
u_char *data = pnt;
u_char *lim = pnt + plen;
u_char llen = 0;
- u_char label_index = 0;
+ u_char label_depth = 0;
for (; data < lim; data += BGP_LABEL_BYTES)
{
@@ -185,18 +185,17 @@ bgp_nlri_get_labels (struct peer *peer, u_char *pnt, u_char plen, mpls_label_t *
llen += BGP_LABEL_BYTES;
bgp_set_valid_label(label);
+ label_depth += 1;
if (bgp_is_withdraw_label(label) || label_bos(label))
break;
-
- label_index += 1;
}
/* If we RX multiple labels we will end up keeping only the last
* one. We do not yet support a label stack greater than 1. */
- if (label_index > 1)
+ if (label_depth > 1)
zlog_warn("%s rcvd UPDATE with label stack %d deep",
- peer->host, label_index);
+ peer->host, label_depth);
if (!(bgp_is_withdraw_label(label) || label_bos(label)))
zlog_warn("%s rcvd UPDATE with invalid label stack - no bottom of stack",