Page MenuHomeVyOS Platform

BGP type 2 length 3294 is too large, attribute total length is 2303. attr_endp is 0x7f9e0bbb56cd. endp is 0x7f9e0bbb52e6
Closed, ResolvedPublicBUG


Apparently there is an old bug in quagga that affects some setups (i.e. two routers, two providers and with ibgp between them) . Seems that quagga already patched this. The patch should be included in next VyOS update:

See more details and fix here:


Difficulty level
Easy (less than an hour)
1.1.6, 1.1.7
Why the issue appeared?
Issues in third-party code

Event Timeline

This patch should also be included in 1.2.x, as i have seem similar behaviour with nightly builds.

syncer assigned this task to Unknown Object (User).Oct 11 2017, 8:49 PM
syncer moved this task from Need Triage to Backlog on the VyOS 1.1.x board.
syncer added a project: VyOS 1.2 Crux.
syncer added subscribers: UnicronNL, dmbaturin, syncer.

Here is patch:
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c

index b7af5e88..d813bfba 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
               assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
               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 */

@dmbaturin @UnicronNL this one is simple, can you add this to both branches

No, I got the patch for this patch, how should I proceed? I have some sessions with this problem.

i still confuse how to patch it, please explain more. thanks

im using vyos in production, how to fix it first?

set protocols bgp 262766 maximum-paths ebgp 75

My solution for the router in production. Vyos

The proposed "maximum-paths" looks to set the maximum number of paths for equal cost routing and not limit the long AS path that causes the noted log entry. I used the following in a production network to work around the issue:

set policy as-path-list maxas-limit rule 10 action 'deny'
set policy as-path-list maxas-limit rule 10 regex '^([{},0-9]+ ){100}'
set policy as-path-list maxas-limit rule 20 action 'permit'
set policy as-path-list maxas-limit rule 20 regex '.*'

set policy route-map route-import description 'Routes learned from peers'
set policy route-map route-import rule 10 action 'permit'
set policy route-map route-import rule 10 match as-path 'maxas-limit'

set protocols bgp [ASNUM] neighbor [IPADDR] route-map import 'route-import'

This regex was taken from a post on the NANOG mailing list and adjusted for 100 total AS numbers in the path. Note that this is applied on all EBGP sessions where my routers might learn a "bad" route.

syncer triaged this task as Normal priority.Dec 21 2017, 9:45 PM

FRR appears to include this fix already, so this should be automatically fixed.

dmbaturin changed Why the issue appeared? from Will be filled on close to Issues in third-party code.
dmbaturin moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.0-rc1) board.