chavoosh / ndn-mongo-fileserver

An NDN fileserver based on MongoDB
GNU General Public License v3.0
5 stars 2 forks source link

Data packet needs FreshnessPeriod #1

Closed yoursunny closed 4 years ago

yoursunny commented 5 years ago

Currently, the chunker generates Data without FreshnessPeriod element: https://github.com/chavoosh/ndn-mongo-fileserver/blob/945e2b16bda54b0392d377fd9658921beecaf7ec/src/util/chunker.cpp#L236-L238

According to NDN Packet Format 0.3:

When frontend sends a version discovery Interest CanBePrefix+MustBeFresh to discover version, a Data generated by the chunker would not be able to satisfy that Interest.

Note: this bug was discovered during my testing of NDNts @ndn/cat package, which implements NDN Packet Format 0.3 semantics.

chavoosh commented 4 years ago

chunker tool generates Data packets with 10s freshness period. Commit: https://github.com/chavoosh/ndn-mongo-fileserver/commit/edf5602c77f6703bbda7ae2fdad30e464b86379f