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

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



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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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