fix(dhcp): release an address before another reservation takes it
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m3s
driver / test (3.12) (pull_request) Successful in 1m25s
driver / test (3.13) (pull_request) Successful in 1m13s
driver / lowest (pull_request) Successful in 45s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m10s
CI / driver (pull_request) Successful in 3m6s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m3s
driver / test (3.12) (pull_request) Successful in 1m25s
driver / test (3.13) (pull_request) Successful in 1m13s
driver / lowest (pull_request) Successful in 45s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m10s
CI / driver (pull_request) Successful in 3m6s
driver / publish (pull_request) Skipped
apply_dhcp_reservationset wrote adds first, then updates in the order of the desired set. Kea keeps addresses unique at each write, so when an address moved from one reservation to another, the reservation taking it was refused as a duplicate whenever it came first. The changes are now ordered (_dhcp_order): an update that moves a reservation off its address goes before the change that takes that address, along a chain from its free end, and adds come after every update. A swap or rotation of addresses has no such order; its changes are still tried, so a server that checks only at the commit takes them, and a refused one's [failed] line says it was a swap and with which reservations. Nothing is moved to a temporary address: the contract knows no free one, and a failed second write would leave it there. The diff is computed against one read of the reservations, shared with diff_dhcp_reservations. Refused rows still do not stop the others, the rest is committed and DhcpApplyError follows, as since 4.35.1. Closes #106
This commit is contained in:
1 parent
5258a43dc9
commit
b4cdcfd347
7 files changed
+347
-43
No files matched your search
@@ -7,6 +7,17 @@ recorded here; their history is the git log.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- `apply_dhcp_reservationset` writes its changes so an address is released before it is
|
||||
taken: an update that moves a reservation off its address goes before the change that
|
||||
takes that address (along a chain, from its free end), and adds come after every
|
||||
update. A server that keeps addresses unique at each write, such as Kea, no longer
|
||||
refuses the second reservation as a duplicate when an address moves from one to
|
||||
another. A swap -- reservations trading addresses, or a longer rotation -- has no such
|
||||
order: its changes are still tried, and where the server refuses them the `[failed]`
|
||||
line says it was a swap and with which reservations. Everything else is still written
|
||||
and committed, and `DhcpApplyError` follows (#106).
|
||||
|
||||
## [4.37.0] - 2026-11-12
|
||||
|
||||
### Added
|
||||
|
||||
Reference in new issue
Block a user