Skip to content
  • Petr Pudlak's avatar
    Fix the computation of the list of reserved IP addresses · 2a050e19
    Petr Pudlak authored
    
    
    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: default avatarPetr Pudlak <pudlak@google.com>
    Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
    2a050e19