mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	Parse/set static ip_address value for uap0. #329
This commit is contained in:
		| @@ -239,18 +239,20 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status) | ||||
|  | ||||
|         // Set dnsmasq values from ini, fallback to default if undefined | ||||
|         $intConfig = parse_ini_file(RASPI_CONFIG_NETWORKING.'/'.RASPI_WIFI_CLIENT_INTERFACE.'.ini', false, INI_SCANNER_RAW); | ||||
|         $ip_address = ($intConfig['ip_address'] == '') ? '10.3.141.1/24' : $intConfig['ip_address']; | ||||
|         $domain_name_server = ($intConfig['domain_name_server'] =='') ? '1.1.1.1 8.8.8.8' : $intConfig['domain_name_server']; | ||||
|         $routers = ($intConfig['routers'] == '') ? '10.3.141.1' : $intConfig['routers']; | ||||
|  | ||||
|         if ($wifiAPEnable == 1) { | ||||
|             // Enable uap0 configuration in dhcpcd for Wifi client AP mode | ||||
|             $intConfig = parse_ini_file(RASPI_CONFIG_NETWORKING.'/uap0.ini', false, INI_SCANNER_RAW); | ||||
|             $ip_address = ($intConfig['ip_address'] == '') ? '192.168.50.1/24' : $intConfig['ip_address']; | ||||
|             $config = PHP_EOL.'# RaspAP uap0 configuration'.PHP_EOL; | ||||
|             $config.= 'interface uap0'.PHP_EOL; | ||||
|             $config.= 'static ip_address=192.168.50.1/24'.PHP_EOL; | ||||
|             $config.= 'static ip_address='.$ip_address.PHP_EOL; | ||||
|             $config.= 'nohook wpa_supplicant'.PHP_EOL; | ||||
|         } else { | ||||
|             // Default config | ||||
|             $ip_address = ($intConfig['ip_address'] == '') ? '10.3.141.1/24' : $intConfig['ip_address']; | ||||
|             $config = '# RaspAP wlan0 configuration'.PHP_EOL; | ||||
|             $config.= 'hostname'.PHP_EOL; | ||||
|             $config.= 'clientid'.PHP_EOL; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user