nasa-jpl / ION-DTN

NASA Open Source ION Software implementation of Delay Tolerant Networking. ION development is managed by the Jet Propulsion Lab; regression testing and code management are provided by Ohio University.
https://nasa-jpl.github.io/ION-DTN/
Other
22 stars 5 forks source link

SF: John Huff: Primary block is mutated due to incomplete CRC support #1

Open iondev33 opened 9 months ago

iondev33 commented 9 months ago

Currently, the primary block serialization function assumes that the same CRC type is always used (CRC16 defined by default in ION). This becomes an issue for interoperability, as when a bundle is forwarded, the primary block CRC type can be changed. For example, if ION forwards a bundle that is using a 4 byte CRC32 for the primary block, when ION goes to (re)serialize the primary block this will be modified to 2 byte CRC16. According to the BPv7 spec, the primary block cannot be modified between creation and delivery. While this doesn't typically cause bundle delivery to fail, it can cause bpsec integrity to fail.

Suggestion is to store the primary block crcType in the Bundle structure during creation and acquisition, and use this to properly encode the CRC type and value in the primary block during serialization.

It might also be nice to add the ability to change the primary block CRC type either for individual bundles as an argument in the bp_send function, or as a bp database setting that can be set in bpadmin and gets applied to all created bundles.

-John

iondev33 commented 5 months ago

An update is planned for ION 4.1.4 during the summer.

j-huff commented 2 months ago

An update is planned for ION 4.1.4 during the summer.

Does that mean that there is fix ready to go, or that we are planning on fixing it for 4.1.4? If it's the latter, I could take a look at it.