Saving the DHCP relay card checks the circuit and remote IDs against the stored settings, not the startup values #315
No reviewers
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!315
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/62-relay-settings-current-values"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Saving the DHCP relay card now checks the circuit and remote IDs against the stored settings, not the startup values, and the RA protocol card does the same for its interval pair.
DhcpSettingsController.PatchRelayreads the unpatched ID fromIOptionsMonitor<Dhcpv4RelayOptions>.CurrentValue;PatchRaProtocolreads the unpatched min/max interval fromIOptionsMonitor<RaProtocolOptions>.CurrentValue(the same mechanismGetCore/GetRause). One read per PATCH, so both fields come from one version.Startup/DhcpServiceRegistration.cs:Dhcpv4RelayOptionsis now bound when the relay is off too (the opposite branch ofAddNinlilDhcpv4Relay, so no double registration), so a saved relay setting reaches the monitor in the default setup.GET relaywith the relay off now shows the stored values instead of compiled defaults. No validation of these options runs at startup, so an unused invalid value cannot stop a start.appsettings.json, which the host loads with reload-on-change, and both options are bound withConfigure<T>(section), so saved values reachCurrentValuebefore a restart. A customRuntimeSettings:ConfigurationFilePathis not watched (pre-existing, shared by the other live reads): filed as #314.IOptions.Value.Tests (
DhcpSettingsControllerLiveReadTests, controller-level because the shared Web test host's settings file is not a configuration source): a remote ID that overflows the stored circuit ID is refused, one that fits it is accepted although the startup circuit ID would refuse it, and the same pair for the RA min/max ratio; all 4 fail with the startup reads put back. Web.Tests 2085 (without Docker, OpenAPI snapshot unchanged), Relay.Tests 36; build 0 warnings; csharpier clean.Closes #62
🤖 Generated with Claude Code
https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK