Bug 2346 - CompressionThreshold limit can be violated
CompressionThreshold limit can be violated
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: sixlowpan
ns-3-dev
All All
: P5 minor
Assigned To: Tommaso Pecorella
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-23 19:51 UTC by Tommaso Pecorella
Modified: 2016-03-24 15:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2016-03-23 19:51:23 UTC
The CompressionThreshold parameter should be checked on the compressed packet, not on the original packet.

The intent of the parameter is to fix a minimum MAC payload, as some MAC types need a minimum payload size. E.g., ContikiMAC sets this to 16 bytes.
Obviously this limit should be smaller than the minimum IP packet (40 bytes).

The actual code checks the packet size *before* the compression, leading to a possible violation. As an example, the smallest IP packet (header only, 40 bytes) can be compressed to 6 bytes, which is smaller than the limit.

The solution is to check the packet *after* the compression.
Comment 1 Tommaso Pecorella 2016-03-24 15:55:58 UTC
pushed in changeset: 12071:a3c5fea29467