summaryrefslogtreecommitdiff
path: root/bgpd/bgp_label.h
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2017-06-20 19:53:27 +0000
committerDaniel Walton <dwalton@cumulusnetworks.com>2017-06-20 19:53:27 +0000
commitbf468c3ca5d96af40ba4af4967ec3e48fdf76447 (patch)
treea7aebb4e423c9e2c6bece888423580953f0353b3 /bgpd/bgp_label.h
parent0826e83cf6757a9ed47492b0cdce52f4d18a6647 (diff)
bgpd: Install SAFI_LABELED_UNICAST routes in SAFI_UNICAST table
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_label.h')
-rw-r--r--bgpd/bgp_label.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_label.h b/bgpd/bgp_label.h
index 796df6652b..c98f4531f6 100644
--- a/bgpd/bgp_label.h
+++ b/bgpd/bgp_label.h
@@ -51,7 +51,10 @@ static inline int
bgp_is_withdraw_label (mpls_label_t *label)
{
u_char *pkt = (u_char *) label;
- if ((pkt[0] == 0x80) && (pkt[1] == 0x00) && (pkt[2] == 0x00))
+
+ /* The check on pkt[2] for 0x00 or 0x02 is in case bgp_set_valid_label()
+ * was called on the withdraw label */
+ if ((pkt[0] == 0x80) && (pkt[1] == 0x00) && ((pkt[2] == 0x00) || (pkt[2] == 0x02)))
return 1;
return 0;
}