[quagga-users 14799] Re: BGP type 2 length 3294 is too large, attribute total length is 2314.

Matthias Ferdinand <mf-5+/[email protected]> Fri, 8 Sep 2017 16:52:47 +0200
Newsgroups gmane.network.quagga.user
Message-ID <20170908145247.GL28721@xoff>
Hi,

Cisco IOS seems to have a nice configuration setting

   bgp maxas-path <num>

https://www.cisco.com/c/en/us/td/docs/ios/12_2/iproute/command/reference/fiprrp_r/1rfbgp1.html#wp1254976

which apparently quagga does not have.

So I set up an as-path access-list like so:

    ip as-path access-list maxas-limit75 deny _[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+
    ip as-path access-list maxas-limit75 permit .

which seems to work, but is not nice to read. I tried to use counting
regexes with braces ([0-9]{0,75}) without success. Is there a more
elegant way to do it than above?

Regards
Matthias Ferdinand