mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-22 12:51:09 +02:00
Current code can broke a packet during serialization due to bug in the "Data.deserialize" call. According to the IEEE Std 802.3 standard an ethernet frame can not have the payload less then 46 bytes. When the ethernet frame have shorter payload it padded with zeros. We observed that for short UDP packets deserialize methods for both the IPv4 and UDP packets calculate length correctly, but the Data payload deserialization method ignores passed length and takess all data up to end of the buffer with ethernet frame. Suggested changes change the Data deserialization method to use only passed "length" bytes instead of whole remaining "data" buffer. Change-Id: I6b93458a8925a0924f3830e3a5d5763369e8ea92