aboutsummaryrefslogtreecommitdiffstats
path: root/config/openospfd/openospfd.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-03-06 15:47:00 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-03-06 15:47:00 -0500
commit52f993034380c1c77038730b00213a1e81a3b8e2 (patch)
tree644cb36977bd483df8c804894492287bc58c5a37 /config/openospfd/openospfd.inc
parente709c65038e0ff8a49c402700c17958ea45e64e9 (diff)
downloadpfsense-packages-52f993034380c1c77038730b00213a1e81a3b8e2.tar.gz
pfsense-packages-52f993034380c1c77038730b00213a1e81a3b8e2.tar.bz2
pfsense-packages-52f993034380c1c77038730b00213a1e81a3b8e2.zip
Fix formatting
Diffstat (limited to 'config/openospfd/openospfd.inc')
-rw-r--r--config/openospfd/openospfd.inc44
1 files changed, 22 insertions, 22 deletions
diff --git a/config/openospfd/openospfd.inc b/config/openospfd/openospfd.inc
index c94b9751..cc1d0de5 100644
--- a/config/openospfd/openospfd.inc
+++ b/config/openospfd/openospfd.inc
@@ -1,6 +1,6 @@
<?php
/*
- ospfd.inc
+ openospfd.inc
Copyright (C) 2010 Ermal Luçi
part of pfSense
All rights reserved.
@@ -83,7 +83,7 @@ function ospfd_install_conf() {
$conffile .= "area {$ospfd_conf['area']} {\n";
if ($config['installedpackages']['ospfdinterfaces']['config']) {
- foreach ($config['installedpackages']['ospfdinterfaces']['config'] as $conf) {
+ foreach ($config['installedpackages']['ospfdinterfaces']['config'] as $conf) {
if (intval($g['latest_config']) >= 6) {
$ospfdif = get_real_interface($conf['interface']);
if ($ospfdif)
@@ -107,27 +107,27 @@ function ospfd_install_conf() {
$ifconfigs .= "\t\tauth-type crypt\n";
$ifconfigs .= "\t\tauth-md 1 \"" . substr($conf['password'], 0, 15) . "\"\n";
$ifconfigs .= "\t\tauth-md-keyid 1\n";
- } else if (!empty($conf['password'])) {
+ } else if (!empty($conf['password'])) {
$options_present = true;
$ifconfigs .= "\t\tauth-type simple\n";
$ifconfigs .= "\t\tauth-key \"" . substr($conf['password'], 0, 7) . "\"\n";
}
if (!empty($conf['routerpriorityelections'])) {
- $options_present = true;
- $ifconfigs .= "\t\trouter-priority {$conf['routerpriorityelections']}\n";
- }
+ $options_present = true;
+ $ifconfigs .= "\t\trouter-priority {$conf['routerpriorityelections']}\n";
+ }
if (!empty($conf['retransmitinterval'])) {
$options_present = true;
$ifconfigs .= "\t\tretransmit-interval {$conf['retransmitinterval']}\n";
}
if (!empty($conf['deadtimer'])) {
- $options_present = true;
- $ifconfigs .= "\t\trouter-dead-time {$conf['deadtimer']}\n";
- }
+ $options_present = true;
+ $ifconfigs .= "\t\trouter-dead-time {$conf['deadtimer']}\n";
+ }
if (!empty($conf['passive'])) {
- $options_present = true;
- $ifconfigs .= "\t\tpassive\n";
- }
+ $options_present = true;
+ $ifconfigs .= "\t\tpassive\n";
+ }
if (!empty($ifconfigs)) {
$conffile .= " {\n {$ifconfigs} \n";
if ($options_present == true)
@@ -168,7 +168,7 @@ function ospfd_install_conf() {
}
function ospfd_validate_interface() {
- global $config, $g, $input_errors;
+ global $config, $g, $input_errors;
if ($config['installedpackages']['ospfdinterfaces']['config']) {
foreach ($config['installedpackages']['ospfdinterfaces']['config'] as $index => $conf) {
@@ -199,19 +199,19 @@ function ospfd_validate_input() {
// get the raw ospfd confi file for manual inspection/editing
function ospfd_get_raw_config() {
- return file_get_contents("/usr/local/etc/ospfd.conf");
+ return file_get_contents("/usr/local/etc/ospfd.conf");
}
// serialize the raw ospfd confi file to config.xml
function ospfd_put_raw_config($conffile) {
- global $config;
- if ($conffile == "")
- unset($config['installedpackages']['ospfd']['rawconfig']);
- else {
- $config['installedpackages']['ospfd']['rawconfig'] = array();
- $config['installedpackages']['ospfd']['rawconfig']['item'] = explode("\n",$_POST['ospfd_raw']);
- $config['installedpackages']['ospfd']['rawconfig'] = $conffile;
- }
+ global $config;
+ if ($conffile == "")
+ unset($config['installedpackages']['ospfd']['rawconfig']);
+ else {
+ $config['installedpackages']['ospfd']['rawconfig'] = array();
+ $config['installedpackages']['ospfd']['rawconfig']['item'] = explode("\n",$_POST['ospfd_raw']);
+ $config['installedpackages']['ospfd']['rawconfig'] = $conffile;
+ }
}
function is_ospfd_running() {