Subject: [Sidrops] ASPA verification algorithm error

From: "Jakob Heitz (jheitz)" <[email-masked]>
Date: Fri, 22 Jan 2021 06:21:01 +0000

Consider the as-path (1 2 3 4), where
1 attests that 2 is its provider
4 attests that 3 is its provider
2 and 3 make no attestations.
Then the path is valid.
The algorithm in https://tools.ietf.org/html/draft-ietf-sidrops-aspa-verification-06
would incorrectly return "unknown"

Here is a working algorithm:

  *   The received AS-path is prepared:
     *   Remove duplicate ASNs.
     *   Prepend own ASN.
     *   May also prepend Forwarded-to ASN to detect own leak. (optional)
  *   For every sequence (A, B, C) of consecutive ASes in an AS-path:
     *   If A attests that B is not a provider and C attests that B is not a provider,
then B leaked the route: B is transiting for free. The segment is invalid.
     *   If either A or C attests that B is a provider, then the AS-path segment  (A, B, C) is valid.
     *   Else if either A or C make no attestation, then the leak state is unknown. Even if B lists both A and C as providers, it is not necessarily a leak, because either A or C could consider B as a provider for some of their routes, even though they don't attest to it.
  *   If all the path segments are valid, then the whole path is valid.
  *   If any of the path segments is invalid, then the whole path is invalid.
  *   Else, at least one path segment is unknown and one more rule must be applied: for any sequence of ASes (A, B1, ..., Bn, C), if A attests that B1 is not a provider and C attests that Bn is not a provider, then the AS-path is invalid. This is for any number of Bx greater than 1.

Regards,
Jakob.