Skip to content

build(deps): bump bgpkit-parser from 0.16.0 to 0.17.0#62

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/bgpkit-parser-0.17.0
Open

build(deps): bump bgpkit-parser from 0.16.0 to 0.17.0#62
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/bgpkit-parser-0.17.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 25, 2026

Copy link
Copy Markdown
Contributor

Bumps bgpkit-parser from 0.16.0 to 0.17.0.

Release notes

Sourced from bgpkit-parser's releases.

v0.17.0

New features

  • Minimal route-level parser: Added BgpRouteElem and into_route_iter() / into_fallible_route_iter() for fast scans when only prefix, AS path, peer metadata, and timestamp are needed (thanks @​ties for the contribution).

    • BgpRouteElem struct with Option<Arc<AsPath>> — shares the same parsed AS path across all announced prefixes from a single BGP UPDATE via Arc
    • RouteIterator and FallibleRouteIterator for MRT records (BGP4MP, TableDump v1/v2, IPv4/IPv6, add-path)
    • Filter support shared via RouteFilterView trait: origin_asn, prefix, peer_ip, peer_asn, type, ts_start/ts_end, as_path, ip_version all match identically to BgpElem
    • Community filters fail-closed (return no match) since communities are not parsed at the route level
    • Trait parity with BgpElem: Display (PSV-style), Eq, PartialOrd, Ord all implemented
    • Performance: ~10-15% faster on updates files, ~50-70% faster on RIB dumps
    • Added examples/route_level_parsing.rs demonstrating performance comparison
  • RFC 3107/8277 MPLS Labeled NLRI support: Added parsing and encoding for BGP MPLS Labeled NLRI (SAFI 4). Note: RFC 8277 obsoletes RFC 3107; both are supported for compatibility:

    • New MplsLabel type with label value, TC, S-bit, and TTL
    • LabeledNetworkPrefix combining prefix with label stack (SmallVec<[MplsLabel; 2]>)
    • LabeledNlriConfig for configurable parsing modes; default is MultiLabel (handles both single and stacked labels)
    • Safi::MplsLabel = 4 added to SAFI enum
    • Nlri struct (inner type of MpReachNlri/MpUnreachNlri) updated with labeled_prefixes field for MPLS announcements
    • Error variants for labeled NLRI parsing failures

Performance improvements

  • Route-level parsing: Selective attribute parsing skips communities, MED, next-hop, local-pref, and other attributes not needed for route identity. Combined with Arc<AsPath> sharing across prefixes from the same message, this yields ~10-15% faster updates parsing and ~50-70% faster RIB dump parsing.

  • AS Path memory optimization: Reduced allocations for common cases using smallvec (thanks @​ties for the contribution):

    • AsPath::segments: Uses SmallVec<[AsPathSegment; 1]> — 99.99% of routes have exactly 1 segment (zero-allocation coverage)
    • AsPathSegment variants: Uses SmallVec<[Asn; 6]> — 90.85% of segments have ≤6 ASNs (zero-allocation coverage)
    • Based on RIB analysis of 200K records from route-views2 (3.29M segments analyzed)

Breaking changes

  • Nlri struct: Added labeled_prefixes: Option<Vec<LabeledNetworkPrefix>> field. This field is None for all non-MPLS routes (SAFI ≠ 4) and is populated only when safi == Safi::MplsLabel. If you pattern-match or destructure Nlri, add .. or handle the new field. No behavior change for existing IPv4/IPv6 unicast parsing.

Fixed

  • RFC 4760 mandatory attribute validation: Fixed validation to properly handle multiprotocol BGP (MP-BGP) conditional mandatory attributes (thanks @​ties for the contribution):
    • Pure withdrawals (no announcements): no mandatory attributes required
    • MP_REACH_NLRI only: ORIGIN and AS_PATH required, NEXT_HOP not required (embedded in MP_REACH_NLRI)
    • IPv4 NLRI: ORIGIN, AS_PATH, and NEXT_HOP all required
    • Mixed (IPv4 NLRI + MP_REACH_NLRI): ORIGIN, AS_PATH required; NEXT_HOP required because IPv4 NLRI is present

Added

  • AttributeValidationState: Extracted reusable validation struct from parse_attributes() so that both full attribute parsing and route-level parsing share identical RFC 7606 / RFC 4271 validation logic.

  • RouteFilterView trait: New internal trait that enables sharing filter matching logic between BgpElem and BgpRouteElem. Community filters return false for route elements since communities are not parsed.

... (truncated)

Changelog

Sourced from bgpkit-parser's changelog.

v0.17.0 - 2026-05-24

New features

  • Minimal route-level parser: Added BgpRouteElem and into_route_iter() / into_fallible_route_iter() for fast scans when only prefix, AS path, peer metadata, and timestamp are needed (thanks @​ties for the contribution).

    • BgpRouteElem struct with Option<Arc<AsPath>> — shares the same parsed AS path across all announced prefixes from a single BGP UPDATE via Arc
    • RouteIterator and FallibleRouteIterator for MRT records (BGP4MP, TableDump v1/v2, IPv4/IPv6, add-path)
    • Filter support shared via RouteFilterView trait: origin_asn, prefix, peer_ip, peer_asn, type, ts_start/ts_end, as_path, ip_version all match identically to BgpElem
    • Community filters fail-closed (return no match) since communities are not parsed at the route level
    • Trait parity with BgpElem: Display (PSV-style), Eq, PartialOrd, Ord all implemented
    • Performance: ~10-15% faster on updates files, ~50-70% faster on RIB dumps
    • Added examples/route_level_parsing.rs demonstrating performance comparison
  • RFC 3107/8277 MPLS Labeled NLRI support: Added parsing and encoding for BGP MPLS Labeled NLRI (SAFI 4) (thanks @​ties for the contribution). Note: RFC 8277 obsoletes RFC 3107; both are supported for compatibility:

    • New MplsLabel type with label value, TC, S-bit, and TTL
    • LabeledNetworkPrefix combining prefix with label stack (SmallVec<[MplsLabel; 2]>)
    • LabeledNlriConfig for configurable parsing modes; default is MultiLabel (handles both single and stacked labels)
    • Safi::MplsLabel = 4 added to SAFI enum
    • Nlri struct (inner type of MpReachNlri/MpUnreachNlri) updated with labeled_prefixes field for MPLS announcements
    • Error variants for labeled NLRI parsing failures

Performance improvements

  • Route-level parsing: Selective attribute parsing skips communities, MED, next-hop, local-pref, and other attributes not needed for route identity. Combined with Arc<AsPath> sharing across prefixes from the same message, this yields ~10-15% faster updates parsing and ~50-70% faster RIB dump parsing.

  • AS Path memory optimization: Reduced allocations for common cases using smallvec (thanks @​ties for the contribution):

    • AsPath::segments: Uses SmallVec<[AsPathSegment; 1]> — 99.99% of routes have exactly 1 segment (zero-allocation coverage)
    • AsPathSegment variants: Uses SmallVec<[Asn; 6]> — 90.85% of segments have ≤6 ASNs (zero-allocation coverage)
    • Based on RIB analysis of 200K records from route-views2 (3.29M segments analyzed)

Breaking changes

  • Nlri struct: Added labeled_prefixes: Option<Vec<LabeledNetworkPrefix>> field. This field is None for all non-MPLS routes (SAFI ≠ 4) and is populated only when safi == Safi::MplsLabel. If you pattern-match or destructure Nlri, add .. or handle the new field. No behavior change for existing IPv4/IPv6 unicast parsing.

Fixed

  • RFC 4760 mandatory attribute validation: Fixed validation to properly handle multiprotocol BGP (MP-BGP) conditional mandatory attributes (thanks @​ties for the contribution):
    • Pure withdrawals (no announcements): no mandatory attributes required
    • MP_REACH_NLRI only: ORIGIN and AS_PATH required, NEXT_HOP not required (embedded in MP_REACH_NLRI)
    • IPv4 NLRI: ORIGIN, AS_PATH, and NEXT_HOP all required
    • Mixed (IPv4 NLRI + MP_REACH_NLRI): ORIGIN, AS_PATH required; NEXT_HOP required because IPv4 NLRI is present

Added

  • AttributeValidationState: Extracted reusable validation struct from parse_attributes() so that both full attribute parsing and route-level parsing share identical RFC 7606 / RFC 4271 validation logic.

... (truncated)

Commits
  • d9889d1 release: prepare v0.17.0
  • 9cfc402 chore: bump oneio to 0.23 and tokio-tungstenite to 0.29
  • 6e460f4 Merge pull request #286 from bgpkit/feature/bmp-rfcs-9515-9736-9972
  • 7b97917 docs: add pre-push checks and cargo-readme guidelines to AGENTS.md
  • 31e5c36 feat: add support for BMP RFCs 9515, 9736, and 9972
  • 2e75811 Merge pull request #284 from ties/feature/minimal-update-level-parser
  • b097723 Update CHANGELOG.md with route-level parser changes
  • 7d21e88 Trait parity between BgpElem and BgpRouteElem
  • ac97c9e Small optimisations, main one is shared as-path
  • 5d9337c Add route-level parsing example
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [bgpkit-parser](https://github.com/bgpkit/bgpkit-parser) from 0.16.0 to 0.17.0.
- [Release notes](https://github.com/bgpkit/bgpkit-parser/releases)
- [Changelog](https://github.com/bgpkit/bgpkit-parser/blob/main/CHANGELOG.md)
- [Commits](bgpkit/bgpkit-parser@v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: bgpkit-parser
  dependency-version: 0.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants