]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNetDevBandwidthParseRate: Reject negative values
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 7 Aug 2015 15:03:12 +0000 (17:03 +0200)
committerCole Robinson <crobinso@redhat.com>
Tue, 22 Sep 2015 00:17:58 +0000 (20:17 -0400)
commit96a808f4760225156a637be57773fc389f014a82
tree28ea20fa2c1c5fb97b19d14b5d924a89ec407abf
parent06cea2192496b52e34b30cc4b2bfc204b4db26a1
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>
(cherry picked from commit 2a5d3f227df7be78449792103e0101a4b859c49b)
src/conf/netdev_bandwidth_conf.c