diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/globals.inc | 2 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 18 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 2 | ||||
-rw-r--r-- | etc/inc/upgrade_config.inc | 17 |
4 files changed, 29 insertions, 10 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 86d50f9..782251a 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -88,7 +88,7 @@ $g = array( "disablehelpmenu" => false, "disablehelpicon" => false, "debug" => false, - "latest_config" => "6.2", + "latest_config" => "6.3", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "105", "minimum_ram_warning_text" => "128 MB", diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 94c5311..d11c52f 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -884,13 +884,14 @@ function interface_ppp_configure($interface) { $wancfg = &$config['interfaces'][$interface]; if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { foreach ($config['ppps']['ppp'] as $pppid => $ppp) { - //$ppp['port'] = $ppp['ports']; - if ($interface == $ppp['ifname']) + if ($wancfg['ptpid'] == $ppp['ptpid']) break; } } - if (!$ppp || !isset($ppp['ifname'])) - return; + if (!$ppp || $wancfg['ptpid'] != $ppp['ptpid'] || stristr($ppp['ports'], ",")){ + log_error("PPP configuration error."); + return; + } /* if ($interface == "wan") $pppid = "0"; @@ -996,7 +997,7 @@ EOD; EOD; $mpdconf .= <<<EOD - set modem device {$ppp['port']} + set modem device {$ppp['ports']} set modem script DialPeer set modem idle-script Ringback set modem watch -cd @@ -1039,11 +1040,11 @@ EOD; fclose($fd); // Launch specified ppp instance - if (file_exists("{$ppp['port']}")) { + if (file_exists("{$ppp['ports']}")) { /* fire up mpd */ mwexec("/usr/local/sbin/mpd5 -b -k -d {$g['varetc_path']} -f mpd_{$interface}.conf -p {$g['varrun_path']}/ppp_{$interface}.pid -s {$interface} pppclient"); } else - log_error("Device {$ppp['port']} has disappeared."); + log_error("Device {$ppp['ports']} has disappeared."); } function interfaces_carp_setup() { @@ -2640,7 +2641,7 @@ function get_real_interface($interface = "wan") { $counter++; } break; - case "pppoe": +/* case "pppoe": if ($if == "wan") $wanif = "pppoe0"; else @@ -2658,6 +2659,7 @@ function get_real_interface($interface = "wan") { else $wanif = "ppp" . substr($if, 3); break; +*/ default: $wanif = $cfg['if']; break; diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index edb50a5..7e16efe 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1313,7 +1313,7 @@ function get_interface_info($ifdescr) { break; } } - $dev = $ppp['port']; + $dev = $ppp['ports']; if (empty($dev)) break; if (file_exists($dev)) { diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index f4d64e8..3e53abe 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -1901,4 +1901,21 @@ function upgrade_061_to_062() { } } +function upgrade_062_to_063() { + global $config; + if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { + foreach ($config['ppps']['ppp'] as $pppid => $ppp) { + if (isset($ppp['port'])){ + $config['ppps']['ppp'][$pppid]['ports'] = $ppp['port']; + unset($config['ppps']['ppp'][$pppid]['port']); + } + if (!isset($ppp['type'])){ + $config['ppps']['ppp'][$pppid]['type'] = "ppp"; + } + if (!isset($ppp['ptpid'])){ + $config['ppps']['ppp'][$pppid]['ptpid'] = uniqid('', true); + } + } + } +} ?> |