Releases: bgpkit/bgpkit-commons
Releases · bgpkit/bgpkit-commons
v0.9.6
v0.9.5
Fix CAIDA as2org data loading issue
- Update
as2org-rsto1.1.0to fix CAIDA as2org data loading issue.
Maintenance
- Update dependencies
v0.9.4
Hot-fix
- Remove
let-chaincoding style to maintain compatibility with older Rust versions.
v0.9.3
Maintenance
- Updated
peeringdb-rsto0.1.2to address 403 error from PeeringDB API - Updated
oneioto0.19.0
Code quality
- Addressed clippy warnings across the codebase with focus on
asinfomodule. - Refactored
asinfo_are_siblingsto use if-let chains and Option combinators, removing unnecessaryunwrap()calls. - Simplified conditional logic (collapsible if) for better readability and safety.
v0.9.2
Features
- RPKI expiry support: Added support for Cloudflare RPKI ROA expiry timestamps
- Added
expiresfield toCfRoaEntrystructure for Cloudflare RPKI data - ROA expiry timestamps are now mapped to
not_afterfield inRoaEntry - Added
validate_check_expiry()method toRpkiTriefor time-aware validation - Added
rpki_validate_check_expiry()method toBgpkitCommonsfor expiry-aware validation - Expired or not-yet-valid ROAs now return
Unknowninstead ofInvalid(correct RPKI behavior)
- Added
Bug fixes
- Fixed typo in
rpki_validate()method (vapidate→validate)
Documentation
- RPKI documentation: Added module documentation covering:
- Data structures and validation process explanation
- Usage examples for both real-time (Cloudflare) and historical (RIPE) data sources
- Performance considerations and error handling guidance
- Multiple ROAs per prefix handling examples
- Added
no_runattribute to RPKI documentation examples to prevent timeouts during doc tests
Testing
- Added unit tests for expiry checking functionality
- Added manual integration test for Cloudflare RPKI data loading with expiry validation
- Run with:
cargo test --release --features rpki test_cloudflare_rpki_expiry_loading -- --ignored --nocapture
- Run with:
v0.9.1
Dependencies
- Made
serdea required dependency (no longer optional) to ensure all public types can be serialized/deserialized - Added
SerializeandDeserializederives to all public structs that were missing them
v0.9.0
Breaking changes
- Error handling: All access methods now return
Result<T>instead of mixedOption<T>/Result<T>patterns - Error types: Changed from
anyhow::Errorto structuredBgpkitCommonsErrorenum with specific error variants - Dependencies: Removed
anyhowdependency completely - now using onlythiserror 2.0for error handling
Feature flags
- Added individual feature flags for each module (
asinfo,as2rel,bogons,countries,mrt_collectors,rpki) - Made all dependencies optional except
thiserror- dependencies are only compiled when their respective features are
enabled - Added
allconvenience feature that enables all modules (set as default for backwards compatibility) - Removed
native-tlsandrustlsfeature flags - oneio now uses rustls by default - Updated GitHub Actions workflow to test all feature combinations
Bug fixes
- Fixed RPKI module to properly handle multiple ROAs for the same prefix
- Added duplicate prevention for ROAs based on (prefix, asn, max_length) triplet
- Enhanced RPKI module documentation with multiple ROAs support details
Code improvements
- Cleaned up
lib.rsby using full paths instead of feature-gated imports - Enhanced CI testing with comprehensive feature combination validation
- Significantly improved lib.rs documentation with comprehensive usage examples
- Added feature flag documentation and minimal build examples
- Enhanced module descriptions with clear feature requirements
- Updated lib.rs with detailed functionality descriptions including load methods, access methods, data sources, and
capabilities for each module - Standardized error handling across all modules - all access methods now return
Result<T>with clear error messages
instead of mixedOption<T>andResult<T>patterns - Unified error message format across all modules with consistent "Data not loaded. Call load_xxx() first." pattern
- Added LazyLoadable trait interface for consistent reloading and status checking across all data modules
- Added loading_status() method to BgpkitCommons for inspecting which modules are currently loaded
- Replaced anyhow with thiserror for structured error handling - introduced BgpkitCommonsError with specific error types
for module loading failures, data source errors, and invalid formats - Added comprehensive error constants and helper methods for consistent error creation across modules
- Eliminated all anyhow! macro calls in favor of structured error types with specific context and guidance
- Added From implementations for common parsing errors (ParseIntError, ParseFloatError) to support automatic error
conversion - Successfully removed anyhow dependency completely - now using only thiserror 2.0 for all error handling
v0.8.2
Hot fix
- Update
oneioto0.18.2to fix potential build issue related torustls_syscrate
v0.8.1
Highlights
- Added support for loading previously generated and cached AS information directly from BGPKIT cache files.
- Introduced
get_asinfo_map_cached()function andBgpkitCommons::load_asinfo_cached()method for fast, offline
loading of AS info. - Added examples in the documentation for using the cached AS info.
- Introduced
- Improved AS name resolution:
- New
get_preferred_name()method forAsInfostruct, prioritizing PeeringDB, as2org, then default name.
- New
- Enhanced PeeringDB integration:
- Added
websitefield to PeeringDB data.
- Added
- Dependency updates:
- Bumped
peeringdb-rsto0.1.1andoneioto0.18.1with new features. - Cleaned up unused dependencies.
- Bumped
- Documentation improvements for new features and updated code examples.
- Added and improved integration tests for cached AS info loading and preferred name resolution.
- Removed outdated or redundant test code.
Other changes
- Updated
README.mdand crate docs to reference version 0.8. - Minor internal refactoring and code cleanup.
v0.8.0
Highlights
- add support for loading PeeringDB (https://www.peeringdb.com) data for
asinfomodule- it uses the [
peeringdb-rs][peeringdb-rs] module for loading the data - users should supply a
PEERINGDB_API_KEYwhen using this feature to avoid frequent rate limiting
- it uses the [
The PeeringDB data for the asinfo module is simplified to contain only the following fields:
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PeeringdbData {
pub asn: u32,
pub name: Option<String>,
pub name_long: Option<String>,
pub aka: Option<String>,
pub irr_as_set: Option<String>,
}Breaking change
The commons.load_asinfo() now takes four arguments, adding a new load_peeringdb boolean argument at the end.
For getting all other data, including organization and IX information, please check out the [peeringdb-rs][peeringdb-rs] crate.
[peerindb-rs][https://github.com/bgpkit/peeringdb-rs]