]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: When receiving a route set the label to invalid
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 3 May 2017 01:48:46 +0000 (21:48 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 3 May 2017 02:34:29 +0000 (22:34 -0400)
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 <sharpd@cumulusnetworks.com>
bgpd/bgp_packet.c

index 3b130556046252861e500eaad75227c18aa6867f..0800dd74bafa5b6dd41d76e589544e5d3178b733 100644 (file)
@@ -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);