From 5bbb36f60ff25b1840e25d9644f9cd9f48d5b5a5 Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Fri, 7 Sep 2018 14:43:11 -0700 Subject: [PATCH] bgpd: Fix for large AS paths which are split into segments Signed-off-by: Martin Winter --- bgpd/bgp_aspath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index e02617691f..9fc52a17a1 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -904,7 +904,7 @@ size_t aspath_put(struct stream *s, struct aspath *as, int use32bit) 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, + assegment_data_put(s, (seg->as + written), AS_SEGMENT_MAX, use32bit); written += AS_SEGMENT_MAX; bytes += ASSEGMENT_SIZE(AS_SEGMENT_MAX, -- 2.39.5