mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 18:07:52 +00:00 
			
		
		
		
	cloud_discovery: add support for hostname_validation
Fixes: WIFI-14694 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		| @@ -80,7 +80,7 @@ function gateway_write(data) { | ||||
| 	gateway ??= {}; | ||||
| 	let new = {}; | ||||
| 	let changed = false; | ||||
| 	for (let key in [ 'server', 'port', 'valid' ]) { | ||||
| 	for (let key in [ 'server', 'port', 'valid', 'hostname_validate' ]) { | ||||
| 		if (exists(data, key)) | ||||
| 			new[key] = data[key]; | ||||
| 		else if (exists(gateway, key)) | ||||
| @@ -166,7 +166,7 @@ function redirector_lookup() { | ||||
| 	let redir = readjsonfile(path); | ||||
| 	if (redir?.controller_endpoint) { | ||||
| 		let controller_endpoint = split(redir.controller_endpoint, ':'); | ||||
| 		if (gateway_write({ server: controller_endpoint[0], port: controller_endpoint[1] || 15002, valid: false })) { | ||||
| 		if (gateway_write({ server: controller_endpoint[0], port: controller_endpoint[1] || 15002, valid: false, hostname_validate: 1 })) { | ||||
| 			ulog(LOG_INFO, `Discovered cloud via lookup service ${redir.server}:${redir.port}\n`); | ||||
|                         client_start(); | ||||
|                 	set_state(VALIDATING); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin