Created
August 2, 2018 16:34
-
-
Save rbgarga/de501850b8165e5d69efd08d1a0d1062 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc | |
index b35964d7ab..4c60f9409e 100644 | |
--- a/src/etc/inc/interfaces.inc | |
+++ b/src/etc/inc/interfaces.inc | |
@@ -2093,7 +2093,8 @@ function interface_ppps_configure($interface) { | |
} | |
} | |
- if (is_array($ports) && count($ports) > 1) { | |
+ if (isset($ppp['pppoe-multilink-over-singlelink']) || | |
+ (is_array($ports) && count($ports) > 1)) { | |
$multilink = "enable"; | |
} else { | |
$multilink = "disable"; | |
@@ -2161,6 +2162,7 @@ startup: | |
set console close | |
# configure the web server | |
set web close | |
+ log +iface +iface2 | |
default: | |
{$ppp['type']}client: | |
@@ -2294,7 +2296,8 @@ EOD; | |
$mtus[$pid] = get_interface_mtu($port) - 8; | |
} | |
} | |
- if (! ($type == "pppoe" && $mtus[$pid] > 1492) ) { | |
+ if (!isset($ppp['pppoe-multilink-over-singlelink']) && | |
+ !($type == "pppoe" && $mtus[$pid] > 1492)) { | |
// N.B. MTU for PPPoE with MTU > 1492 is set using pppoe max-payload - see below | |
$mpdconf .= <<<EOD | |
set link mtu {$mtus[$pid]} | |
@@ -2302,7 +2305,8 @@ EOD; | |
EOD; | |
} | |
- if (!empty($mrus[$pid])) { | |
+ if (!isset($ppp['pppoe-multilink-over-singlelink']) && | |
+ !empty($mrus[$pid])) { | |
$mpdconf .= <<<EOD | |
set link mru {$mrus[$pid]} | |
diff --git a/src/usr/local/www/interfaces_ppps_edit.php b/src/usr/local/www/interfaces_ppps_edit.php | |
index d10470b7f0..59b0fd8d50 100644 | |
--- a/src/usr/local/www/interfaces_ppps_edit.php | |
+++ b/src/usr/local/www/interfaces_ppps_edit.php | |
@@ -100,6 +100,9 @@ if (isset($id) && $a_ppps[$id]) { | |
if (isset($a_ppps[$id]['protocomp'])) { | |
$pconfig['protocomp'] = true; | |
} | |
+ if (isset($a_ppps[$id]['pppoe-multilink-over-singlelink'])) { | |
+ $pconfig['pppoe-multilink-over-singlelink'] = true; | |
+ } | |
if (isset($a_ppps[$id]['vjcomp'])) { | |
$pconfig['vjcomp'] = true; | |
} | |
@@ -411,6 +414,8 @@ if ($_POST['save']) { | |
$ppp['shortseq'] = $_POST['shortseq'] ? true : false; | |
$ppp['acfcomp'] = $_POST['acfcomp'] ? true : false; | |
$ppp['protocomp'] = $_POST['protocomp'] ? true : false; | |
+ $ppp['pppoe-multilink-over-singlelink'] = | |
+ $_POST['pppoe-multilink-over-singlelink'] ? true : false; | |
$ppp['vjcomp'] = $_POST['vjcomp'] ? true : false; | |
$ppp['tcpmssfix'] = $_POST['tcpmssfix'] ? true : false; | |
if (is_array($port_data['bandwidth'])) { | |
@@ -827,6 +832,13 @@ $section->addInput(new Form_Checkbox( | |
$pconfig['protocomp'] | |
))->setHelp('Protocol field compression. This option saves one byte per frame for most frames.'); | |
+$section->addInput(new Form_Checkbox( | |
+ 'pppoe-multilink-over-singlelink', | |
+ 'Multilink over single link', | |
+ 'Multilink extensions over single link', | |
+ $pconfig['pppoe-multilink-over-singlelink'] | |
+))->addClass('pppoe')->setHelp('If provider support LCP multilink extensions over single link (will ignore MTU / MRU settings)'); | |
+ | |
// Display the Link parameters. We will hide this by default, then un-hide the selected ones on clicking 'Advanced' | |
$j = 0; | |
foreach ($linklist['list'] as $ifnm => $nm) { | |
@@ -940,6 +952,7 @@ events.push(function() { | |
(!$pconfig['tcpmssfix']) && | |
(!$pconfig['shortseq']) && | |
(!$pconfig['acfcomp']) && | |
+ (!$pconfig['pppoe-multilink-over-singlelink']) && | |
(!$pconfig['protocomp'])) { | |
$showadv = false; | |
} else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment