DHCP DNS registration follows the scope's host-name conflict policy, and the scopes API reads and writes it #188

Open
opened 2026-10-31 12:42:23 -04:00 by claude · 0 comments
Owner
  • Draft: BUG-50
  • Priority: low
  • Agent: coder
  • Depends on: #187
  • Decisions: Q-BUG-11, R2-SUFFIX

Why

See #186.

What changes

  • DhcpDnsRegistrationService.HandleLeaseChangeAsync: at the two refusal points (:175-190 static records, :203-217 another live lease), a scope with AppendSuffix registers the suffixed name instead (six hex digits of SHA-256 of the client identifier), by the same checks (a static record or another live lease at the suffixed name means refuse). The result reports the name actually registered. A later renewal of the same lease finds its own record by address (existingByAddress) and keeps it.
  • When the policy changes back to Refuse, existing suffixed records are left until the lease's next event; say so in the class summary.
  • src/dotnet/src/Ninlil.Web/Models/DhcpModels.cs: hostNameConflictPolicy on the scope detail and the write request, with its XML doc; DhcpScopesController create, update and PATCH; the scope examples. A missing field on create means Refuse.
  • README DHCP DNS registration section.

Acceptance

  • src/dotnet/tests/Ninlil.Dhcp.Server.DnsIntegration.Tests, red first: with AppendSuffix, a second client asking for a name held by a live lease gets <label>-<six hex digits> equal to the first six hex digits of SHA-256 of its client identifier; the same client renewing keeps the same name; a name held by a static A record also gets the suffix while the static record is untouched; with Refuse, behaviour is unchanged.
  • A label of 63 octets is shortened so the suffixed label is 63 octets.
  • src/dotnet/tests/Ninlil.Web.Tests: create, read and patch the field; an unknown value gives 400. All pass except OpenApiSnapshotTests (#189, same PR).

Source

#186.
Owner decision 2026-10-31, round 2 (R2-SUFFIX).

- **Draft:** BUG-50 - **Priority:** low - **Agent:** coder - **Depends on:** #187 - **Decisions:** Q-BUG-11, R2-SUFFIX ### Why See #186. ### What changes - `DhcpDnsRegistrationService.HandleLeaseChangeAsync`: at the two refusal points (`:175-190` static records, `:203-217` another live lease), a scope with `AppendSuffix` registers the suffixed name instead (six hex digits of SHA-256 of the client identifier), by the same checks (a static record or another live lease at the suffixed name means refuse). The result reports the name actually registered. A later renewal of the same lease finds its own record by address (`existingByAddress`) and keeps it. - When the policy changes back to `Refuse`, existing suffixed records are left until the lease's next event; say so in the class summary. - `src/dotnet/src/Ninlil.Web/Models/DhcpModels.cs`: `hostNameConflictPolicy` on the scope detail and the write request, with its XML doc; `DhcpScopesController` create, update and PATCH; the scope examples. A missing field on create means `Refuse`. - README DHCP DNS registration section. ### Acceptance - [ ] `src/dotnet/tests/Ninlil.Dhcp.Server.DnsIntegration.Tests`, red first: with `AppendSuffix`, a second client asking for a name held by a live lease gets `<label>-<six hex digits>` equal to the first six hex digits of SHA-256 of its client identifier; the same client renewing keeps the same name; a name held by a static A record also gets the suffix while the static record is untouched; with `Refuse`, behaviour is unchanged. - [ ] A label of 63 octets is shortened so the suffixed label is 63 octets. - [ ] `src/dotnet/tests/Ninlil.Web.Tests`: create, read and patch the field; an unknown value gives 400. All pass except `OpenApiSnapshotTests` (#189, same PR). ### Source #186. Owner decision 2026-10-31, round 2 (R2-SUFFIX).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#188
No description provided.