aboutsummaryrefslogtreecommitdiffstats
path: root/config/openospfd/openospfd.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-03 21:05:56 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-03 21:05:56 +0000
commitc8509026e1d946817b93b7231d7b58dedcc3b33e (patch)
treee1af96887caaafec578ba36262cbce307df72bbf /config/openospfd/openospfd.inc
parent2053c099e6e01cf9e5aff33204e153d0addd6f0b (diff)
downloadpfsense-packages-c8509026e1d946817b93b7231d7b58dedcc3b33e.tar.gz
pfsense-packages-c8509026e1d946817b93b7231d7b58dedcc3b33e.tar.bz2
pfsense-packages-c8509026e1d946817b93b7231d7b58dedcc3b33e.zip
Fix creation of interface settings written on config. Add passive option. Allow redistribute rules to be specified.
Diffstat (limited to 'config/openospfd/openospfd.inc')
-rw-r--r--config/openospfd/openospfd.inc15
1 files changed, 14 insertions, 1 deletions
diff --git a/config/openospfd/openospfd.inc b/config/openospfd/openospfd.inc
index d64e8774..d38ec82f 100644
--- a/config/openospfd/openospfd.inc
+++ b/config/openospfd/openospfd.inc
@@ -54,13 +54,21 @@ function ospfd_install_conf() {
if ($ospfd_conf['updatefib'])
$conffile .= "fib-update no\n";
+ if (is_array($ospfd_conf['row'])) {
+ foreach ($ospfd_conf['row'] as $redistr) {
+ if (isset($redistr['redistribute']))
+ $conffile .= "no ";
+ $conffile .= "redistribute {$redistr['routevalue']}\n";
+ }
+ }
+
if ($ospfd_conf['redistributeconnectedsubnets'])
$conffile .= "redistribute connected\n";
if ($ospfd_conf['redistributedefaultroute'])
$conffile .= "redistribute default\n";
- if ($ospfd_conf['resdistributestatic'])
+ if ($ospfd_conf['redistributestatic'])
$conffile .= "redistribute static\n";
if ($ospfd_conf['spfholdtime'])
@@ -78,6 +86,7 @@ function ospfd_install_conf() {
foreach ($config['installedpackages']['ospfdinterfaces']['config'] as $conf) {
$conffile .= "\tinterface " . $config['interfaces'][$conf['interface']]['if'];
$options_present = false;
+ $ifconfigs = "";
if (!empty($conf['metric'])) {
$options_present = true;
$ifconfigs .= "\t\tmetric {$conf['metric']}\n";
@@ -108,6 +117,10 @@ function ospfd_install_conf() {
$options_present = true;
$ifconfigs .= "\t\trouter-dead-time {$conf['deadtimer']}\n";
}
+ if (!empty($conf['passive'])) {
+ $options_present = true;
+ $ifconfigs .= "\t\tpassive\n";
+ }
if (!empty($ifconfigs)) {
$conffile .= " {\n {$ifconfigs} \n";
if ($options_present == true)