[ovs-dev] [PATCH 3/5] ofp-util: Meter fixes.

Ben Pfaff blp at nicira.com
Thu Jun 27 00:13:15 UTC 2013

On Thu, Jun 27, 2013 at 01:39:50AM +0300, Jarno Rajahalme wrote:
> Validate claimed message length for meter stats in ofp-util.c.
> Clean up meters in ofp-util.h.
> Fix the impossible duration values in ofp-print.at.
> Signed-off-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>

I think that the check in ofputil_decode_meter_config() is
unnecessary, because ofputil_pull_bands() will check itself, via
ofpbuf_try_pull().  But it looks like I forgot to make a corresponding
improvement in ofputil_pull_band_stats(), and the new change in
ofputil_decode_meter_config() isn't enough, because if len > msg->size
then the ofpbuf_pull() in ofputil_pull_band_stats() will assert-fail.

I like the rest, thanks.

More information about the dev mailing list