From 0ce5d20e460e416c4cffd4f0aa97b8c6a539416a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 2 May 2017 21:48:46 -0400 Subject: [PATCH] bgpd: When receiving a route set the label to invalid When we are receiving a route the attr->extra->label_index is being set to 0. This should be BGP_INVALID_LABEL_INDEX instead since we cannot rely on 0 to be correct for labels. I believe that there are probably other spots that need this type of fix, but I will let testing snuggle-bump them out. Signed-off-by: Donald Sharp --- bgpd/bgp_packet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 3b13055604..0800dd74ba 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1391,6 +1391,7 @@ bgp_update_receive (struct peer *peer, bgp_size_t size) /* Set initial values. */ memset (&attr, 0, sizeof (struct attr)); memset (&extra, 0, sizeof (struct attr_extra)); + extra.label_index = BGP_INVALID_LABEL_INDEX; memset (&nlris, 0, sizeof (nlris)); attr.extra = &extra; memset (peer->rcvd_attr_str, 0, BUFSIZ); -- 2.39.5