diff options
author | Mehak Mahajan <mmahajan@nicira.com> | 2012-08-15 11:19:35 -0700 |
---|---|---|
committer | Mehak Mahajan <mmahajan@nicira.com> | 2012-08-15 11:19:35 -0700 |
commit | 21f045ac7eb2ecdd3bab919c9fc9ebb7dde84dd7 (patch) | |
tree | 56a9796f027db5afe42482e48617bf5328fb64cc /lib/bundle.c | |
parent | a359d5ad700c7175c75134cce3cee8d87d19d67c (diff) | |
download | openvswitch-21f045ac7eb2ecdd3bab919c9fc9ebb7dde84dd7.tar.gz |
Correct number of bytes to allocated for slaves in bundle action.
The size of each slave is a uint16_t. This means that each slave needs 2 bytes
at the end of nx_action_bundle. Earlier, the size of each slave was not being
factored in when allocating space. This commit corrects that by allocating 2
bytes for each slave when calculating the total number of bytes to be allocated
at the end of nx_action_bundle.
Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
Diffstat (limited to 'lib/bundle.c')
-rw-r--r-- | lib/bundle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundle.c b/lib/bundle.c index c6b1f75eb..e0f8e6b6c 100644 --- a/lib/bundle.c +++ b/lib/bundle.c @@ -217,7 +217,7 @@ bundle_check(const struct ofpact_bundle *bundle, int max_ports, void bundle_to_nxast(const struct ofpact_bundle *bundle, struct ofpbuf *openflow) { - int slaves_len = ROUND_UP(bundle->n_slaves, OFP_ACTION_ALIGN); + int slaves_len = ROUND_UP(2 * bundle->n_slaves, OFP_ACTION_ALIGN); struct nx_action_bundle *nab; ovs_be16 *slaves; size_t i; |