summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-11-14 16:07:30 -0800
committerBen Pfaff <blp@ovn.org>2018-11-19 08:47:55 -0800
commit024d93f62ca7a7fef9c8fc5f69a38b60ebf7e0ab (patch)
tree63fb7f06d61f70042de6128e91950297fe90b9e6 /configure.ac
parent9a403b07608fb1853c1b3e350250c204a1ca8496 (diff)
downloadopenvswitch-024d93f62ca7a7fef9c8fc5f69a38b60ebf7e0ab.tar.gz
ofp-actions: Make all actions a multiple of OFPACT_ALIGNTO bytes.
The functions to put ofpacts into ofpbufs have always padded them to OFPACT_ALIGNTO boundaries, but the underlying structures weren't necessarily padded out. That led to difficulties in a few places where structures were allocated on the stack instead in an ofpbuf, because functions like ofpact_init_*() would access beyond the end of the actual structure. This is true, for example, in test_multipath_main() in tests/test-multipath.c, which allocates a struct ofpact_multipath on the stack, and in lswitch_handshake() in learning-switch.c, which allocates a struct ofpact_output on the stack. It's possible to fix these individual cases, but it's possible that there are others that haven't been identified. This commit addresses the issue another way, by padding all of the ofpact structures to a full multiple of OFPACT_ALIGNTO and adding assertions to ensure that it can't be screwed up in the future. This commit removes the OFPACT_*_SIZE enums, because they are now equivalent to sizeof(struct ofpact_*) in every case. Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions