Skip to content

Use RFC-compliant RPKI-ROV procedure#957

Open
job wants to merge 1 commit intoinex:mainfrom
job:roa_check
Open

Use RFC-compliant RPKI-ROV procedure#957
job wants to merge 1 commit intoinex:mainfrom
job:roa_check

Conversation

@job
Copy link

@job job commented Feb 3, 2026

Depending on how many and what parameters exactly are passed to roa_check(), the filter language operator function performs a fast - RFC-compliant - check, or a slower check, potentially even using the wrong part of the AS_PATH attribute.

Background: calling the facility as roa_check(table) checks the route origin validation state of the route at hand in the specified ROA table. Using the facility in this particular way, is the way recommended by the BIRD developers.

The roa_check(table, prefix, asn) variant is an explicit version of the above described ROA check for users who for whatever reason need to check a different prefix or different ASN than the default one. The equivalent call to the above mentioned short variant is roa_check(table, net, bgp_path.last) but, according to docs, it is faster to call the short variant.

Calling roa_check() with bgp_path.last_nonaggregated not only is slower, but also problematic from a compliance perspective, because it might result in a (silent) misapplication of the RFC 6811 origin validation procedure: the wrong ASN might be passed into the operator as the Origin ASN.

This PR also resolves a logging inconsistency in router/server/bird2/rpki.foil.php where the routing policy would conduct check bgp_path.last_nonaggregated but end up logging a message using bgp_path.last, which can result in hard-to-troubleshoot situations.

Depending on how many and what parameters exactly are passed to
roa_check(), the function performs a fast - RFC-compliant - check,
or a slower check, potentially even using the wrong part of the
AS_PATH attribute.

Calling the facility as "roa_check(table)" checks the route origin
validation state of the route at hand in the specified ROA table.
Using the facility in this particular way, is the way recommended by
the BIRD developers.

The "roa_check(table, prefix, asn)" variant is an explicit version of
the above described ROA check for users who for whatever reason need
to check a different prefix or different ASN than the default one. The
equivalent call to the above mentioned short variant is
"roa_check(table, net, bgp_path.last)" but, according to docs, it is
faster to call the short variant.

Calling roa_check() with "bgp_path.last_nonaggregated" is problematic
because it might result in a misapplication of the RFC 6811 origin
validation procedure.

This PR also resolves a logging inconsistency where the routing policy
would conduct check "bgp_path.last_nonaggregated" but end up logging a
message using "bgp_path.last", which can result in hard-to-troubleshoot
situations.
@nickhilliard
Copy link
Member

this is an update of #692.

AS_SETs are now formally deprecated in rfc9774 and appear to be a good deal more unusual than when the issue was originally brought up a couple of years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants