aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/openospfd/openospfd.inc15
-rw-r--r--config/openospfd/openospfd.xml24
-rw-r--r--config/openospfd/openospfd_interfaces.xml6
3 files changed, 42 insertions, 3 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)
diff --git a/config/openospfd/openospfd.xml b/config/openospfd/openospfd.xml
index 3088084c..a5bc100c 100644
--- a/config/openospfd/openospfd.xml
+++ b/config/openospfd/openospfd.xml
@@ -54,7 +54,7 @@
<field>
<fielddescr>Update FIB (Routing table)</fielddescr>
<fieldname>updatefib</fieldname>
- <description>Enables the updating of the host routing table</description>
+ <description>Disables the updating of the host routing table(turns into stub router).</description>
<type>checkbox</type>
</field>
<field>
@@ -71,7 +71,7 @@
</field>
<field>
<fielddescr>Redistribute static</fielddescr>
- <fieldname>resdistributestatic</fieldname>
+ <fieldname>redistributestatic</fieldname>
<description>Enables the redistribution of static routes</description>
<type>checkbox</type>
</field>
@@ -93,6 +93,26 @@
<description>If set to yes, decisions regarding AS-external routes are evaluated according to RFC 1583. The default is no.</description>
<type>checkbox</type>
</field>
+ <field>
+ <fielddescr>This rules will take precedence over any other redistribute option specified above.</fielddescr>
+ <fieldname>none</fieldname>
+ <type>rowhelper</type>
+ <rowhelper>
+ <rowhelperfield>
+ <fielddescr>Disable Redistribute</fielddescr>
+ <fieldname>redistribute</fieldname>
+ <description>Redistribute rules.</description>
+ <type>checkbox</type>
+ <size>20</size>
+ </rowhelperfield>
+ <rowhelperfield>
+ <fielddescr>Route value</fielddescr>
+ <fieldname>routevalue</fieldname>
+ <type>input</type>
+ <size>25</size>
+ </rowhelperfield>
+ </rowhelper>
+ </field>
</fields>
<custom_php_resync_config_command>
ospfd_install_conf();
diff --git a/config/openospfd/openospfd_interfaces.xml b/config/openospfd/openospfd_interfaces.xml
index b8f2522e..ea4c0dfb 100644
--- a/config/openospfd/openospfd_interfaces.xml
+++ b/config/openospfd/openospfd_interfaces.xml
@@ -62,6 +62,12 @@
<size>30</size>
<type>input</type>
</field>
+ <field>
+ <fielddescr>Interface is Passive</fielddescr>
+ <fieldname>passive</fieldname>
+ <description>Prevent transmission and reception of OSPF packets on this interface. The specified interface will be announced as a stub network.</description>
+ <type>checkbox</type>
+ </field>
<field>
<fielddescr>Enable MD5 password for this OSPFd interface (default no)</fielddescr>
<fieldname>md5password</fieldname>