cloud_discovery: run est_client enroll before discovery process

Always obtain EST certificates before starting the discovery process.
This ensures certificates are already available from the EST server, since
the FQDN may be provided via DHCP discovery or another discovery method,
and requires valid certificates to proceed.

Fixes: WIFI-15123

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
This commit is contained in:
Marek Kwaczynski
2025-09-18 10:50:49 +02:00
committed by John Crispin
parent 7c2b8e8de0
commit 957e3ca997

View File

@@ -260,11 +260,11 @@ function interval_handler() {
if (!time_is_valid())
return;
discovery_method = DISCOVER_DHCP;
if (discover_dhcp())
if (system('/usr/bin/est_client enroll'))
return;
if (system('/usr/bin/est_client enroll'))
discovery_method = DISCOVER_DHCP;
if (discover_dhcp())
return;
discovery_method = DISCOVER_FLASH;