[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)
2 files changed
tree: 2aa8e35c187c337a59811c5282e52ab80690d831
  1. .buckconfig
  2. .dockerignore
  3. .gitignore
  4. .gitreview
  5. BUCK
  6. Dockerfile
  7. Jenkinsfile
  8. LICENSE.txt
  9. README.md
  10. apps/
  11. buck-tools/
  12. bucklets/
  13. cli/
  14. core/
  15. docs/
  16. drivers/
  17. features/
  18. incubator/
  19. lib/
  20. models/
  21. modules.bzl
  22. modules.defs
  23. onos.defs
  24. pipelines/
  25. pom.xml
  26. protocols/
  27. providers/
  28. tools/
  29. utils/
  30. web/
README.md

ONOS : Open Network Operating System

What is ONOS?

ONOS is a new SDN network operating system designed for high availability, performance, scale-out.

Top-Level Features

  • High availability through clustering and distributed state management.
  • Scalability through clustering and sharding of network device control.
  • Performance that is good for a first release, and which has an architecture that will continue to support improvements.
  • Northbound abstractions for a global network view, network graph, and application intents.
  • Pluggable southbound for support of OpenFlow and new or legacy protocols.
  • Graphical user interface to view multi-layer topologies and inspect elements of the topology.
  • REST API for access to Northbound abstractions as well as CLI commands.
  • CLI for debugging.
  • Support for both proactive and reactive flow setup.
  • SDN-IP application to support interworking with traditional IP networks controlled by distributed routing protocols such as BGP.
  • IP-Optical use case demonstration.

Checkout our website and our tools