summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-06-10 22:54:17 +0700
committergnhb <gnoahb@gmail.com>2010-06-10 22:54:17 +0700
commitced4df74289cb84ac9aa05d77e78ea81abb423e7 (patch)
tree2bbd43ebb0901976ce646dbe95ebfdd86345655e /etc
parent2b52ecd6fd2440e7e835163333f2cfd3eab6ea8d (diff)
downloadpfsense-ced4df74289cb84ac9aa05d77e78ea81abb423e7.zip
pfsense-ced4df74289cb84ac9aa05d77e78ea81abb423e7.tar.gz
Take out all code that assumes to use DHCP for local ip if local ip is left blank.
Also, check for blank local IPs and error out if they occur.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 6d4ea8f..e033ab9 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1048,7 +1048,7 @@ function interface_ppps_configure($interface) {
/* configure interface */
if ($localips[$pid] == "dhcp") {
// configure DHCP on the $port interface
- interface_dhcp_configure($port);
+ interface_dhcp_configure(convert_real_interface_to_friendly_interface($port));
// Wait for the IP address before proceeding.
for ($count = 0; $count < 30; $count++) {
$localips[$pid] = find_interface_ip($port);
@@ -1061,6 +1061,10 @@ function interface_ppps_configure($interface) {
return 0;
}
} else {
+ if(!is_ipaddr($localips[$pid])){
+ log_error("Could not get PPtP/L2tP Local IP address for {$port} using DHCP in interfaces_ppps_configure.");
+ return 0;
+ }
// Manually configure interface IP/subnet
pfSense_interface_setaddress($port, "{$localips[$pid]}/{$subnets[$pid]}");
interfaces_bring_up($port);
OpenPOWER on IntegriCloud