5 Commits

Author SHA1 Message Date
Andrea Barberio
3e32ddb5ac Fix dependabot warnings, bump Go vesions to 1.19 and 1.20
Updated all the dependencies and addressed dependabot warnings from 12
to 20, starting at
https://github.com/coredhcp/coredhcp/security/dependabot/12 .
This also required dropping Go 1.14/1.15 and bump to the latest two
versions, 1.19 and 1.20.

Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2023-08-08 21:50:49 +02:00
Anatole Denis
7b65f6832a plugins/prefix: Fix a panic with empty hints
A missing nilcheck caused prefix allocation to panic for requests
without hints

Signed-off-by: Anatole Denis <anatole@unverle.fr>
2021-01-27 22:28:47 +00:00
Anatole Denis
de9ac24a42 plugins/prefix: Implement basic lease allocation logic
This implements the meat of the plugin, which stores allocated leases
(only in memory) but also a basic heuristic to allocate leases to
requests.

The logic will not provide the best fit; it tries to do something
reasonable but there is no universal best behavior here.

Performance hasn't been considered at this point, because lease storage
will be moved out into its own plugin(s) in the future.

Signed-off-by: Anatole Denis <anatole@unverle.fr>
2020-08-09 19:05:58 +02:00
Anatole Denis
fb0d278233 plugins/allocators: Rename fixedsize to bitmap
Allocators themselves are implementation details for now; bitmap
reflects better the properties of this allocator

Signed-off-by: Anatole Denis <anatole@unverle.fr>
2020-08-09 19:05:58 +02:00
Anatole Denis
6342ac1088 plugins/prefix: Initial plugin handler
Signed-off-by: Anatole Denis <anatole@unverle.fr>
2020-08-09 19:05:58 +02:00