Skip to content

Releases: bgpkit/bgpkit-commons

v0.9.6

30 Oct 00:24
4d9749f

Choose a tag to compare

Maintenance

  • Update dependencies to better handle rustls crypto providers:
    • peeringdb-rs to 0.1.3
    • oneio to 0.20.0
    • as2org-rs to 1.1.1

v0.9.5

29 Oct 17:50
5931df7

Choose a tag to compare

Fix CAIDA as2org data loading issue

  • Update as2org-rs to 1.1.0 to fix CAIDA as2org data loading issue.

Maintenance

  • Update dependencies

v0.9.4

09 Sep 21:38
a7c2c32

Choose a tag to compare

Hot-fix

  • Remove let-chain coding style to maintain compatibility with older Rust versions.

v0.9.3

09 Sep 21:18
1dc464c

Choose a tag to compare

Maintenance

  • Updated peeringdb-rs to 0.1.2 to address 403 error from PeeringDB API
  • Updated oneio to 0.19.0

Code quality

  • Addressed clippy warnings across the codebase with focus on asinfo module.
  • Refactored asinfo_are_siblings to use if-let chains and Option combinators, removing unnecessary unwrap() calls.
  • Simplified conditional logic (collapsible if) for better readability and safety.

v0.9.2

31 Jul 22:38
b9bd915

Choose a tag to compare

Features

  • RPKI expiry support: Added support for Cloudflare RPKI ROA expiry timestamps
    • Added expires field to CfRoaEntry structure for Cloudflare RPKI data
    • ROA expiry timestamps are now mapped to not_after field in RoaEntry
    • Added validate_check_expiry() method to RpkiTrie for time-aware validation
    • Added rpki_validate_check_expiry() method to BgpkitCommons for expiry-aware validation
    • Expired or not-yet-valid ROAs now return Unknown instead of Invalid (correct RPKI behavior)

Bug fixes

  • Fixed typo in rpki_validate() method (vapidatevalidate)

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_run attribute 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

v0.9.1

31 Jul 18:58
36df00d

Choose a tag to compare

Dependencies

  • Made serde a required dependency (no longer optional) to ensure all public types can be serialized/deserialized
  • Added Serialize and Deserialize derives to all public structs that were missing them

v0.9.0

30 Jul 05:45
204b54b

Choose a tag to compare

Breaking changes

  • Error handling: All access methods now return Result<T> instead of mixed Option<T>/Result<T> patterns
  • Error types: Changed from anyhow::Error to structured BgpkitCommonsError enum with specific error variants
  • Dependencies: Removed anyhow dependency completely - now using only thiserror 2.0 for 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 all convenience feature that enables all modules (set as default for backwards compatibility)
  • Removed native-tls and rustls feature 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.rs by 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 mixed Option<T> and Result<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

06 Jun 21:32
db53edd

Choose a tag to compare

Hot fix

  • Update oneio to 0.18.2 to fix potential build issue related to rustls_sys crate

v0.8.1

01 Jun 16:43
94e7b4e

Choose a tag to compare

Highlights

  • Added support for loading previously generated and cached AS information directly from BGPKIT cache files.
    • Introduced get_asinfo_map_cached() function and BgpkitCommons::load_asinfo_cached() method for fast, offline
      loading of AS info.
    • Added examples in the documentation for using the cached AS info.
  • Improved AS name resolution:
    • New get_preferred_name() method for AsInfo struct, prioritizing PeeringDB, as2org, then default name.
  • Enhanced PeeringDB integration:
    • Added website field to PeeringDB data.
  • Dependency updates:
    • Bumped peeringdb-rs to 0.1.1 and oneio to 0.18.1 with new features.
    • Cleaned up unused dependencies.
  • 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.md and crate docs to reference version 0.8.
  • Minor internal refactoring and code cleanup.

v0.8.0

27 May 22:41
6973cbc

Choose a tag to compare

Highlights

  • add support for loading PeeringDB (https://www.peeringdb.com) data for asinfo module
    • it uses the [peeringdb-rs][peeringdb-rs] module for loading the data
    • users should supply a PEERINGDB_API_KEY when using this feature to avoid frequent rate limiting

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]