Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements a new "split" mode for RPKI validation that separates invalid prefixes into a dedicated withdrawal message, along with refactoring to improve code consistency and upgrading dependencies.
Changes:
- Added new
rpki_splitmode that creates separate UPDATE messages for invalid prefixes (as withdrawals) while keeping valid/not_found prefixes in the original message - Refactored struct field names from camelCase to snake_case for consistency (e.g.,
roaReady→roa_done,fileMod→file_mod) - Upgraded bgpfix dependency from v0.10.1 to v0.15.2 with corresponding API changes (
Disable()→Drop())
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| stages/rpki/validate.go | Renamed validate to validateMsg; added split logic to create separate withdrawal messages for invalid prefixes; moved ROA cache loading earlier; reorganized tag handling |
| stages/rpki/rpki.go | Added rpki_split constant and mode; renamed fields to snake_case; added in_split input for split functionality; updated help text and error messages |
| stages/rpki/next_test.go | Updated field name from roaReady to roa_done |
| stages/rpki/next.go | Updated field name from roaReady to roa_done |
| stages/rpki/file.go | Updated field names from fileMod/fileHash to file_mod/file_hash |
| pkg/extio/extio.go | Updated method calls from Disable() to Drop() to match bgpfix v0.15.2 API |
| go.mod | Updated bgpfix from v0.10.1 to v0.15.2; moved golang.org/x/time from indirect to direct dependency |
| go.sum | Updated checksums for bgpfix and klauspost/compress dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| switch { | ||
| case len(not_found) > 0: | ||
| tags["rpki/status"] = "NOT_FOUND" | ||
| m.Edit() | ||
| } | ||
|
|
||
| case len(not_found) > 0: | ||
| if s.tag { | ||
| tags["rpki/status"] = "NOT_FOUND" | ||
| case len(valid) > 0: | ||
| tags["rpki/status"] = "VALID" | ||
| m.Edit() | ||
| } |
There was a problem hiding this comment.
The priority of RPKI status tags has changed. Previously, when a message contained both VALID and NOT_FOUND prefixes (and no INVALID), the status would be set to "VALID". Now it will be set to "NOT_FOUND". This changes the behavior where NOT_FOUND (unknown validation status) takes precedence over VALID (confirmed valid). The switch cases should be reordered to check for valid prefixes first, maintaining the original priority of VALID over NOT_FOUND.
No description provided.