ofp-actions: Add padding in ofpacts_pull_openflow_instructions()
authorWilliam Tu <u9012063@gmail.com>
Fri, 11 Dec 2015 01:58:15 +0000 (17:58 -0800)
committerBen Pfaff <blp@ovn.org>
Wed, 23 Dec 2015 07:08:59 +0000 (23:08 -0800)
commit4caa2fd2babbda24b5ad07f34747a6ba74cfd44a
treeabffe490187be30a56047c590d0f74b98faf922f
parentefe2037e15bba110286e6e6edeb163730d069d84
ofp-actions: Add padding in ofpacts_pull_openflow_instructions()

ofpacts_pull_openflow_instructions() should fill 'ofpacts' with a list
of OpenFlow actions and each action (including the last one) should be
padded to OFP_ACTION_ALIGN(8) bytes.

In most of the cases this is taken care of (e.g. by ofpacts_decode), but
for the Goto-Table instruction (and Clear-Actions, based on a quick code
inspection), this wasn't the case.

This caused the copy operation in recirc_unroll_actions() to read two
extra bytes after an allocated area (not a big deal, but enough to
displease the AddressSanitizer).

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Co-authored-by: Daniele Di Proietto <diproiettod@vmware.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/ofp-actions.c