Re: [PATCH] network: fix virtual network bridge delay setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/23/2012 09:26 AM, Laine Stump wrote:
> libvirt's network config documents that a bridge's STP "forward delay"
> (called "delay" in the XML) should be specified in seconds, but
> virNetDevBridgeSetSTPDelay() assumes that it is given a delay in
> milliseconds (although the comment at the top of the function
> incorrectly says "seconds".
> 
> This fixes the comment, and converts the delay to milliseconds before
> calling virNetDevBridgeSetSTPDelay().
> ---

ACK.

> +    /* delay is configured in seconds, but virNetDevBridgeSetSTPDelay
> +     * expects milliseconds
> +     */
>      if (virNetDevBridgeSetSTPDelay(network->def->bridge,
> -                          network->def->delay) < 0)
> +                                   network->def->delay * 1000) < 0)

Do we need to worry about integer overflow, or are the chances of
someone configuring network->def->delay > INT_MAX/1000 unlikely?

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]