Project

General

Profile

« Previous | Next » 

Revision 507af8dd

Added by Pierre POMES over 15 years ago

Use get_interface_ip instead of a manual shell_exec(ifconfig). Ticket #69

View differences:

etc/inc/openvpn.inc
308 308
		$iface_ip=$ipaddr;
309 309
	} else {
310 310
		if ((!empty($interface)) && (strcmp($interface, "any"))) {
311
			$iface=convert_friendly_interface_to_real_interface_name($interface);
312

  
313
			// Get ip address for the requested interface
314
			$lines = explode(' ', trim(shell_exec("ifconfig {$iface} | grep inet | grep -v inet6")));
315
			$iface_ip = $lines[1];		
311
			$iface_ip=get_interface_ip($interface);
316 312
		}
317 313
	}
318 314

  

Also available in: Unified diff