ovs-ofctl: Handle any number of buckets in group statistics
authorSimon Horman <horms@verge.net.au>
Thu, 5 Sep 2013 05:19:13 +0000 (14:19 +0900)
committerBen Pfaff <blp@nicira.com>
Thu, 5 Sep 2013 20:02:29 +0000 (13:02 -0700)
commit646b2a9c80fc14f6b7efc8a978bd58c25ffdd49b
treee0ea998ad5e8b2d9600fc36ee569a44a3afd2e92
parent56750e2e32e23025a0882e75f02d93ad556b77fa
ovs-ofctl: Handle any number of buckets in group statistics

struct ofputil_group_stats has an arbitrary limit
of 16 buckets for which it can record statistics.
However the code does not appear to enforce this
limit and it seems to me that the code could overflow.

This patch aims to remove the arbitrary limit by
changing the 'bucket_stats' field of struct ofputil_group_stats
from a fixed length array to a pointer whose storage is allocated and freed
as necessary.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-print.c
lib/ofp-util.c
lib/ofp-util.h
ofproto/ofproto.c