On Thu, Aug 09, 2018 at 03:10:11PM +0200, Claudio Jeker wrote:
> Per rfc6472 AS_SET should no longer be used but some AS still do.
> Until now source-as would take the rightmost AS number of an AS_PATH
> no matter if it was an AS_SEQUENCE or an AS_SET. Thit is not correct.
Indeed, good find!
> Also because AS_SET are used in aggregation source-as should match
> against the aggregator AS (which it the rightmost as of the previous
> AS_PATH segment). At the same time move the peer-as check out of the
> loop, there is no reason to have that inside the for loop.
>
> This diff implements this and also makes aspath_extract() and the
> lenght checks a bit more paranoid.
tested:
$ bgpctl show rib source-as 8530 5.39.176.0/21
flags: * = Valid, > = Selected, I = via IBGP, A = Announced, S = Stale
origin: i = IGP, e = EGP, ? = Incomplete
flags destination gateway lpref med aspath origin
I*> 5.39.176.0/21 192.147.168.1 100 0 2914 8530 {
198753 } ?
OK job@
Kind regards,
Job