1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

4 commits

Author SHA1 Message Date
Dominik Honnef
6f9a67a7c7 Make IP allocator lazy
Instead of allocating all possible IPs in advance, generate them as
needed.

A loop will cycle through all possible IPs in sequential order,
allocating them as needed and marking them as in use. Once the loop
exhausts all IPs, it will wrap back to the beginning. IPs that are
already in use will be skipped. When an IP is released, it will be
cleared and be available for allocation again.

Two decisions went into this design:

1) Minimize memory footprint by only allocating IPs that are actually
in use

2) Minimize reuse of released IP addresses to avoid sending traffic to
the wrong containers

As a side effect, the functions for IP/Mask<->int conversion have been
rewritten to never be able to fail in order to reduce the amount of
error returns.

Fixes gh-231
2013-04-01 06:02:44 +02:00
Jonathan Rudenberg
6bcc55f7d0 Update AUTHORS and add .mailmap 2013-03-28 20:53:54 -04:00
John Costa
e53f45f621 incorporate feedback from https://github.com/dotcloud/docker/issues/42 2013-03-26 09:17:44 -04:00
Daniel Mizyrycki
09d96656a0 packaging; issue #30: Add ubuntu deb packaging 2013-03-13 17:08:04 -07:00