named-data-iot / ndn-riot

NDN stack module for RIOT-OS
8 stars 8 forks source link

put data before an interest is received #7

Closed astralien3000 closed 7 years ago

astralien3000 commented 7 years ago

The aim is to put data in the cache when it is generated, even if no interest message have been received. Is that even an acceptable behaviour ? Currently, if the data don't match anything in the pit, the data is discarded.

wentaoshang commented 7 years ago

The earlier versions of NDN forwarders (ccnd and nfd) support this behavior, but it is considered a hack and may open a door for DDoS attack where the attacker keeps shooting unrequested data to the victim and fill up the victim's cache table.

In principle, the application should implement its own data store to hold the pre-generated data, instead of (ab)using the NDN stack's cache table. Also, the cached data may be removed from the cache table at any time. So the application is ultimately responsible for maintaining its data anyway.

astralien3000 commented 7 years ago

Ok thanks for the explanations !