commit | 1e28d2a6aa35214242a62c235d2702b5ce8814a4 | [log] [tgz] |
---|---|---|
author | Dmytro Titov <d.titov@inango-systems.com> | Mon Jun 10 18:07:52 2019 +0500 |
committer | Pier Luigi Ventre <pier@opennetworking.org> | Mon Jun 17 14:44:17 2019 +0000 |
tree | 2aa8e35c187c337a59811c5282e52ab80690d831 | |
parent | b2f71145f0589425c88ed41e9c6ed551193962b2 [diff] |
[ONOS-8000] Use passed length for Data payload 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 (cherry picked from commit a1010de8ea7c5228d35eae62875e20d02555cb24)
ONOS is a new SDN network operating system designed for high availability, performance, scale-out.