Convert MTU from 1.2.3 to MSS on 2.0, fixes #1886

This commit is contained in:
jim-p 2011-11-01 16:30:14 -04:00
parent 8081f31622
commit f6ee561edb

View File

@ -2212,6 +2212,17 @@ function upgrade_060_to_061() {
$config['interfaces']['wan']['enable'] = true;
if (is_array($config['interfaces']['lan']))
$config['interfaces']['lan']['enable'] = true;
/* On 1.2.3 the "mtu" field adjusted MSS.
On 2.x the "mtu" field is actually the MTU. Rename accordingly.
See redmine ticket #1886
*/
foreach ($config['interfaces'] as $ifr => &$intf) {
if (isset($intf['mtu']) && is_numeric($intf['mtu'])) {
$intf['mss'] = $intf['mtu'];
unset($intf['mtu']);
}
}
}
function upgrade_061_to_062() {