diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 08b57c28dc..5fc7850d3f 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1053,8 +1053,6 @@ function interface_ppps_configure($interface) { break; sleep(1); } - log_error("Could not get PPtP/L2tP Local IP address for {$port} using DHCP in interfaces_ppps_configure"); - return 0; } else { // Manually configure interface IP/subnet mwexec("/sbin/ifconfig " . escapeshellarg($port) . " " . @@ -1062,15 +1060,15 @@ function interface_ppps_configure($interface) { } /* configure the gateway (remote IP ) */ if (!is_ipaddr($gateways[$pid]) && is_hostname($gateways[$pid])) { - // do a DNS lookup for the gateway IP and store it in $gateways[$pid] + /* do a DNS lookup for the gateway IP and store it in $gateways[$pid] + If this pptp interface is not the default gateway, the default must be up and nameservers must resolve + whatever the user enters as the hostname */ for ($count = 0; $count < 30; $count++) { $gateways[$pid] = gethostbyname($gateways[$pid]); if(is_ipaddr($gateways[$pid])) break; sleep(1); } - log_error("Could not get a PPtP/L2tP Remote IP address for {$port} using DNS in interfaces_ppps_configure"); - return 0; } if (0) // Logic for this? log_error("Could not bring up interface {$port} for {$interface} {$ppp['type']} link in interface_ppps_configure()."); diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 0cf637cb6b..e2c38246dc 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -150,9 +150,13 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { if ($a_ppps[$pppid]['type'] == "pptp"){ $pconfig['pptp_username'] = $a_ppps[$pppid]['username']; $pconfig['pptp_password'] = base64_decode($a_ppps[$pppid]['password']); - $pconfig['pptp_local'] = $a_ppps[$pppid]['localip']; - $pconfig['pptp_subnet'] = $a_ppps[$pppid]['subnet']; - $pconfig['pptp_remote'] = $a_ppps[$pppid]['gateway']; + $pconfig['pptp_local'] = explode(",",$a_ppps[$pppid]['localip']); + foreach ($pconfig['pptp_local'] as $key => $value){ + if ($value == "dhcp") + $pconfig['localip'][$key] = ""; + } + $pconfig['pptp_subnet'] = explode(",",$a_ppps[$pppid]['subnet']); + $pconfig['pptp_remote'] = explode(",",$a_ppps[$pppid]['gateway']); $pconfig['pptp_dialondemand'] = isset($a_ppps[$pppid]['ondemand']); $pconfig['pptp_idletimeout'] = $a_ppps[$pppid]['timeout']; } @@ -1412,17 +1416,17 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" = Password - + Local IP address - + / @@ -1431,7 +1435,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" = Remote IP address - + @@ -1448,6 +1452,20 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" = seconds
If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature. + + Advanced + + + Click here + for additional PPtP and L2tP configuration options. Save first if you made changes. + + + + Click here + for advanced PPtP and L2tP configuration options. + + + diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php index 78ae49cfa6..1a1ff45cbc 100644 --- a/usr/local/www/interfaces_ppps_edit.php +++ b/usr/local/www/interfaces_ppps_edit.php @@ -107,9 +107,6 @@ if (isset($id) && $a_ppps[$id]) { } $pconfig['subnet'] = explode(",",$a_ppps[$id]['subnet']); $pconfig['gateway'] = explode(",",$a_ppps[$id]['gateway']); - if (isset($a_ppps[$id]['dhcp'])) - $pconfig['pptp_dhcp'] = true; - break; case "pppoe": $pconfig['provider'] = $a_ppps[$id]['provider']; /* ================================================ */ @@ -694,7 +691,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" - +
This option enables Van Jacobson TCP header compression, which saves several bytes per TCP data packet. You almost always want this option. This compression ineffective for TCP connections with enabled modern extensions like time stamping or SACK, which modify TCP options between sequential packets. @@ -714,7 +711,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" ShortSeq - +
@@ -722,14 +719,14 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" ACFComp - +
ProtoComp - +