Skip to content

Commit

Permalink
ensure all padding fields are set to value 0 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
akoepsel committed Jul 4, 2018
1 parent 21ad547 commit 2a26fc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -13,6 +13,7 @@ v0.13.1
[+] added experimental matches from OFDPA-2:
VRF, OVID, ALLOW_VLAN_TRANSLATION, ACTSET_OUTPUT
[B] fixed invalid length fields for experimental OXM matches
[B] ensure all padding fields are set to value 0

v0.13.0
[+] thread pool
Expand Down
2 changes: 2 additions & 0 deletions src/rofl/common/openflow/messages/cofmsg.cc
Expand Up @@ -19,6 +19,8 @@ void cofmsg::pack(uint8_t *buf, size_t buflen) {
if (buflen < cofmsg::length())
throw eInvalid("eInvalid", __FILE__, __FUNCTION__, __LINE__);

memset(buf, 0, buflen); // ensure padding fields to be set to 0

struct rofl::openflow::ofp_header *hdr =
(struct rofl::openflow::ofp_header *)buf;

Expand Down

0 comments on commit 2a26fc8

Please sign in to comment.