Merge pull request #1154 from donaldsharp/bgp_aspath

bgpd: Fix AS_PATH size calculation for long paths
This commit is contained in:
David Lamparter 2017-09-11 11:05:08 +02:00 committed by GitHub
commit 953d97fc4a

View File

@ -892,7 +892,7 @@ size_t aspath_put(struct stream *s, struct aspath *as, int use32bit)
assegment_data_put(s, seg->as, AS_SEGMENT_MAX,
use32bit);
written += AS_SEGMENT_MAX;
bytes += ASSEGMENT_SIZE(written, use32bit);
bytes += ASSEGMENT_SIZE(AS_SEGMENT_MAX, use32bit);
}
/* write the final segment, probably is also the first