[dev] bgpd: Fix AS_PATH size calculation for long paths

Mike Tancsa mike at sentex.net
Fri Oct 13 11:03:03 EDT 2017


On 10/1/2017 3:04 PM, Donald Sharp wrote:
> I'll cherry-pick this bug to 2.0 and 3.0.  Shouldn't be an issue at
> all.  I would say 3.0 is more than stable enough.

Thanks!  There was another bug someone just submitted a patch for around
this issue. Not sure if its correct or not or applies or not.

https://lists.quagga.net/pipermail/quagga-dev/2017-October/033289.html


--- bgp_aspath.c.orig   2017-10-13 10:59:35.924624000 -0400
+++ bgp_aspath.c        2017-10-13 11:02:16.622721000 -0400
@@ -889,8 +889,8 @@
                        while ((seg->length - written) > AS_SEGMENT_MAX) {
                                assegment_header_put(s, seg->type,
                                                     AS_SEGMENT_MAX);
-                               assegment_data_put(s, seg->as,
AS_SEGMENT_MAX,
-                                                  use32bit);
+                               assegment_data_put(s, (seg->as+written),
+                                                  AS_SEGMENT_MAX,
use32bit);
                                written += AS_SEGMENT_MAX;
                                bytes += ASSEGMENT_SIZE(AS_SEGMENT_MAX,
use32bit);
                        }




More information about the dev mailing list