On Fri, Apr 17, 2015 at 07:14:47PM +0200, 'Petr Pudlak' via ganeti-devel wrote:
> After refactoring the code for network addresses to Haskell, a
> regression appeared that added 30 to all IP addresses in the generated
> list. Since the code for generating the list used just 'show' and look
> for 0s and 1s in the string (and treating anything else as 0), it turned
> out that after adding a separate type for address pools, the strings
> become
>
> "AddressPool {apReservations = ...}"
>
> and the initial part of the string was exactly the mysterious 30
> characters.
>
> This fix replaces this by switching to correct types and iterating over
> the bits in BitArray.
>
> Fixes #1068.
>
> Signed-off-by: Petr Pudlak <[email protected]>
> ---
> src/Ganeti/Query/Network.hs | 26 ++++++++++----------------
> 1 file changed, 10 insertions(+), 16 deletions(-)
LGTM
--
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores