For queries, take the correct base address of an IP block
authorKlaus Aehlig <aehlig@google.com>
Fri, 9 Oct 2015 16:15:02 +0000 (18:15 +0200)
committerKlaus Aehlig <aehlig@google.com>
Mon, 12 Oct 2015 15:04:13 +0000 (17:04 +0200)
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Lisa Velden <velden@google.com>

src/Ganeti/Query/Network.hs

index 46b6a61..23818f6 100644 (file)
@@ -172,7 +172,7 @@ getReservations _ Nothing = []
 getReservations net (Just pool) =
   map snd . filter fst
   $ zip (BA.toList . apReservations $ pool)
-        (iterate nextIp4Address $ ip4netAddr net)
+        (iterate nextIp4Address $ ip4BaseAddr net)
 
 -- | Computes the external reservations as string for a network.
 getExtReservationsString :: Network -> ResultEntry