Skip to content

bpv7: Bundle Protocol v7 contrib with RFC validation - #5126

Open
polybassa wants to merge 3 commits into
secdev:masterfrom
polybassa:split/bpv7-contrib
Open

bpv7: Bundle Protocol v7 contrib with RFC validation#5126
polybassa wants to merge 3 commits into
secdev:masterfrom
polybassa:split/bpv7-contrib

Conversation

@polybassa

Copy link
Copy Markdown
Contributor

Summary

  • Add BPv7 primary/canonical blocks, EID handling, and CRC verification
  • RFC 9171 / 9758 validation (fragments, Previous Node, lifecycle, etc.)

Stack

PR 3 of 3. Depends on #5124 (CRC) and the CBOR PR. Includes the stacked foundations plus scapy/contrib/bpv7.py and UTS.

Test plan

  • ./test/run_tests -t test/contrib/bpv7.uts -N
  • flake8 / mypy on scapy/contrib/bpv7.py

@polybassa

Copy link
Copy Markdown
Contributor Author

This is the third PR. We should merge #5124 and #5125 before, to reduce the number of changes

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 18.27523% with 2227 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.16%. Comparing base (b3bbcc8) to head (04724ca).

Files with missing lines Patch % Lines
scapy/cbor/cborfields.py 22.18% 796 Missing ⚠️
scapy/contrib/bpv7.py 18.70% 752 Missing ⚠️
scapy/cbor/cborcodec.py 4.08% 446 Missing ⚠️
scapy/cbor/cbor.py 30.14% 146 Missing ⚠️
scapy/cborpacket.py 15.53% 87 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (b3bbcc8) and HEAD (04724ca). Click for more details.

HEAD has 10 uploads less than BASE
Flag BASE (b3bbcc8) HEAD (04724ca)
12 2
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5126       +/-   ##
===========================================
- Coverage   80.63%   47.16%   -33.48%     
===========================================
  Files         390      373       -17     
  Lines       96936    98985     +2049     
===========================================
- Hits        78168    46685    -31483     
- Misses      18768    52300    +33532     
Files with missing lines Coverage Δ
scapy/cbor/__init__.py 100.00% <ø> (ø)
scapy/cborpacket.py 22.60% <15.53%> (-66.87%) ⬇️
scapy/cbor/cbor.py 41.53% <30.14%> (-42.09%) ⬇️
scapy/cbor/cborcodec.py 13.46% <4.08%> (-74.32%) ⬇️
scapy/contrib/bpv7.py 18.70% <18.70%> (ø)
scapy/cbor/cborfields.py 26.78% <22.18%> (-51.07%) ⬇️

... and 337 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Nils Weiss and others added 2 commits September 1, 2026 13:57
Rewrite the CBOR packet/field layer toward ASN.1-style Scapy APIs,
harden maps/floats/optionals, and add pinned cbor2 differential coverage
behind an isolated tox/CI job.

AI-Assisted: yes (Cursor)
Co-authored-by: Cursor <cursoragent@cursor.com>
Rename CBORF_PACKET/SEQUENCE_OF/ARRAY_OF constructor kwargs to
pkt_cls so typing.Generic.__new__ does not collide on 3.7, and drop
the BPv7-only BundleEidField unit from the CBOR campaign.

AI-Assisted: yes (Cursor)
Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce BPv7 primary/canonical blocks, EID handling, CRC verification,
and RFC 9171/9758 validation coverage on top of the CBOR field layer.

AI-Assisted: yes (Cursor)
Co-authored-by: Brian Sipos <brian.sipos@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant