mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 12:33:02 +02:00
Add a `hostname` leaf to the `mdns` YANG container with default `"%h"`, allowing operators to override the avahi host-name used for mDNS A/AAAA records without reflashing. The default expands to DEFAULT_HOSTNAME from os-release, preserving existing behaviour for unconfigured deployments. Format specifiers %h/%i/%m are supported via the existing hostnamefmt() infrastructure, which is also fixed to copy the const fmt argument to a local buffer before modification (UB when called with a libyang-owned string). Signed-off-by: Joachim Wiberg <troglobit@gmail.com>