diff --git a/ChangeLog b/ChangeLog index 159818586d..382d0dcaff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +1828. [bug] andrei + Fix trivial logic error in handling the "lease4-update" command + manifesting itself on v4 if multi-threading is enabled. + Notable affected environment is a HA with the + "send-lease-updates" configuration setting explicitly set to + true. Prior to this fix, lease updates would not go through to + other HA nodes, even though some log lines would say they would. + A simple workaround prior to this fix is to disable + multi-threading. + (Gitlab #1542) + Kea 1.8.1 (stable) released on Nov 12, 2020 1801. [build] razvan diff --git a/src/hooks/dhcp/lease_cmds/lease_cmds.cc b/src/hooks/dhcp/lease_cmds/lease_cmds.cc index d11788c0ed..ac2bb32b30 100644 --- a/src/hooks/dhcp/lease_cmds/lease_cmds.cc +++ b/src/hooks/dhcp/lease_cmds/lease_cmds.cc @@ -1819,7 +1819,7 @@ LeaseCmdsImpl::lease4UpdateHandler(CalloutHandle& handle) { // Try to avoid a race. ResourceHandler4 resource_handler; use_cs = !resource_handler.tryLock4(lease4->addr_); - if (use_cs) { + if (!use_cs) { added = addOrUpdate4(lease4, force_create); } }