From: Donald Sharp Date: Wed, 3 May 2017 01:48:46 +0000 (-0400) Subject: bgpd: When receiving a route set the label to invalid X-Git-Tag: reindent-master-before~202^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0ce5d20e460e416c4cffd4f0aa97b8c6a539416a;p=matthieu%2Ffrr.git 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 --- 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);