]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
virNetDevBandwidthParseRate: Reject negative values
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 7 Aug 2015 15:03:12 +0000 (17:03 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 10 Aug 2015 11:47:48 +0000 (13:47 +0200)
commit2a5d3f227df7be78449792103e0101a4b859c49b
tree489f905c2ce19a758b4e444dec7825378783154a
parent17cba9fb511adf82118d49b1d1a62abce99796a8
virNetDevBandwidthParseRate: Reject negative values

https://bugzilla.redhat.com/show_bug.cgi?id=1022292

The following XML really does not make any sense:

<inbound average="-1" burst="-2" peak="-3" floor="-4"/>

There can't be a negative packet rate. Well, so far we haven't
assigned any meaning to it. So reject it unless users harm themselves,
because otherwise we turn the negative numbers into really big values.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/netdev_bandwidth_conf.c