ippool: Fix collision detection altorithm
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Thu, 9 Feb 2012 09:50:35 +0000 (10:50 +0100)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Mon, 13 Feb 2012 17:03:41 +0000 (18:03 +0100)
commitd1ddd581e699333cd5eea06ebf8caf96890e2b74
tree9f8159bd4af49da9bff9ac9ae6fbbcf0babfb5a8
parent768a37983196a19aedf8b8c0e1fc20dd436c5aa0
ippool: Fix collision detection altorithm

Track only private address ranges in a list. If the first IP is
assigned for a range check if a pool collides. For this we need
to check all entries in the list if the new IP is the range of an
allocated pool.

This can be made faster with the right data structure and
algorithm (e.g. segment overlap detection algorithms).
src/ippool.c