Skip to content

Dev0117#22

Merged
pforemski merged 3 commits intomainfrom
dev0117
Jan 17, 2026
Merged

Dev0117#22
pforemski merged 3 commits intomainfrom
dev0117

Conversation

@pforemski
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_split mode 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., roaReadyroa_done, fileModfile_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.

Comment on lines +163 to 171
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()
}
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@pforemski pforemski merged commit eb28b59 into main Jan 17, 2026
6 checks passed
@pforemski pforemski deleted the dev0117 branch January 17, 2026 16:30
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