Refactor confd deps#1511
Open
mattiaswal wants to merge 3 commits into
Open
Conversation
Extract the monolithic handle_dependencies() into five smaller functions, each handling one dependency type: - dep_symmetric_keys() - key -> wifi secret - dep_asymmetric_keys() - key -> ssh hostkey/web cert - dep_hostname() - hostname -> dhcp-server/mdns - dep_wifi_interfaces() - interface wifi -> radio hardware - dep_radio_components() - radio hardware -> interface wifi Also fixes a potential NULL dereference of dwifi before accessing its access-point child, and removes redundant NULL checks for YANG-guaranteed mandatory leaves (list keys, mandatory true).
When keystore keys change, trigger regeneration of wireguard interfaces that reference them: - Asymmetric key change: triggers interfaces using it as private-key - Symmetric key change: triggers interfaces using it as preshared-key (both at peers bag-level and individual peer-level)
Move the hostname-triggers-dhcp-client logic from dhcp-client.c into the centralized dep_hostname() dependency tracker. When the hostname changes, all interfaces with DHCP client configured are now added to the diff by the core dependency resolver, so dhcp_client_change() picks them up through its normal diff-based interface iteration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
Tick relevant boxes, this PR is-a or has-a: