From 64d124c5682718bbc6c4abd1a658d290cce53cc1 Mon Sep 17 00:00:00 2001 From: gnhb Date: Wed, 5 May 2010 16:39:11 +0700 Subject: Code configured to use new interfaces_ppps_configure function for PPP, PPPoE, and PPtP links. --- usr/local/www/interfaces_ppps_edit.php | 44 +++++++++++++--------------------- 1 file changed, 16 insertions(+), 28 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php index aa11ff7..9bfa2c4 100644 --- a/usr/local/www/interfaces_ppps_edit.php +++ b/usr/local/www/interfaces_ppps_edit.php @@ -218,7 +218,9 @@ if ($_POST) { break; } if ($_POST['type'] == "ppp" && count($_POST['interfaces']) > 1) - $input_errors[] = "The PPP link type does not support multilink connections (MLPPP). Please select only one Link Interface."; + $input_errors[] = "Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface."; + if ($_POST['type'] == "pptp" && count($_POST['interfaces']) > 1) + $input_errors[] = "Multilink connections (MLPPP) using the PPTP link type is not currently supported. Please select only one Link Interface."; if (($_POST['provider'] && !is_domain($_POST['provider']))) $input_errors[] = "The service name contains invalid characters."; if (($_POST['idletimeout'] != "") && !is_numericint($_POST['idletimeout'])) @@ -262,7 +264,7 @@ if ($_POST) { $ppp = array(); $ppp['ptpid'] = $_POST['ptpid']; $ppp['type'] = $_POST['type']; - $ppp['ports'] = implode(',', $_POST['interfaces']); + $ppp['ports'] = implode(',',$_POST['interfaces']); $ppp['username'] = $_POST['username']; $ppp['password'] = base64_encode($_POST['password']); $ppp['defaultgw'] = $_POST['defaultgw'] ? true : false; @@ -370,19 +372,7 @@ if ($_POST) { write_config(); if (!empty($thisif)){ - switch ($_POST['type']) { - case "pppoe": - interface_ppps_configure($thisif); - break; - case "pptp": - interface_pptp_configure($thisif); - break; - case "ppp": - interface_ppps_configure($thisif); - break; - default: - break; - } + interface_ppps_configure($thisif); } header("Location: interfaces_ppps.php"); exit; @@ -529,7 +519,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" $port_count = 0; foreach ($portlist as $ifn => $ifinfo){ $port_count++; - //if (is_jumbo_capable($ifn)) { echo htmlspecialchars($ifn . " (" . $ifinfo['mac'] . ")") . ",{$ifn}"; - //echo "\"{$ifn}\""; - if (stristr($pconfig['interfaces'], $ifn)) + if (in_array($ifn,$selected_ports)) echo ",1|"; else echo ",|"; @@ -592,9 +580,8 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" Idle Timeout - seconds -
Sets the idle timeout value for the bundle. If no incoming or outgoing packets are transmitted for the set number of seconds - the connection is brought down. An idle timeout of zero disables this feature. Default is 0. + (seconds) Default is 0, which disables the timeout feature. +
If no incoming or outgoing packets are transmitted for the entered number of seconds the connection is brought down.
When the idle timeout occurs, if the dial-on-demand option is enabled, mpd goes back into dial-on-demand mode. Otherwise, the interface is brought down and all associated routes removed.
@@ -789,7 +776,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" Compression - > Enable vjcomp(compression). + > Disable vjcomp(compression) (enabled by default).
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. @@ -798,7 +785,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" TCPmssFix - > Enable tcpmssfix. + > Enable tcpmssfix (disabled by default).
This option causes mpd to adjust incoming and outgoing TCP SYN segments so that the requested maximum segment size is not greater than the amount allowed by the interface MTU. This is necessary in many setups to avoid problems caused by routers that drop ICMP Datagram Too Big messages. Without these messages, the originating machine sends data, it passes the rogue router then hits a machine that has an MTU that is not big enough for the data. Because the IP Don't Fragment option is set, @@ -809,21 +796,22 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" ShortSeq - > Enable shortseq. -
This option is only meaningful if multi-link PPP is negotiated. It proscribes shorter multi-link fragment headers, saving two bytes on every frame. + > Disable shortseq (enabled by default). +
This option is only meaningful if multi-link PPP is negotiated. It proscribes shorter multi-link fragment headers, saving two bytes on every frame. + It is not necessary to disable this for connections that are not multi-link. ACFComp - > Enable acfcomp. + > Disable acfcomp(compression) (enabled by default).
Address and control field compression. This option only applies to asynchronous link types. It saves two bytes per frame. ProtoComp - > Enable protocomp(compression). + > Disable protocomp(compression) (enabled by default).
Protocol field compression. This option saves one byte per frame for most frames. -- cgit v1.1