aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/quagga_ospfd/quagga_ospfd.inc40
-rw-r--r--config/quagga_ospfd/quagga_ospfd.xml2
2 files changed, 27 insertions, 15 deletions
diff --git a/config/quagga_ospfd/quagga_ospfd.inc b/config/quagga_ospfd/quagga_ospfd.inc
index b5a63bd0..40d73786 100644
--- a/config/quagga_ospfd/quagga_ospfd.inc
+++ b/config/quagga_ospfd/quagga_ospfd.inc
@@ -142,6 +142,21 @@ function quagga_ospfd_install_conf() {
}
+ $redist = "";
+ $noredist = "";
+ if (is_array($ospfd_conf['row'])) {
+ foreach ($ospfd_conf['row'] as $redistr) {
+ if (empty($redistr['routevalue']))
+ continue;
+ if (isset($redistr['redistribute'])) {
+ $noredist .= " access-list dnr-list deny {$redistr['routevalue']}\n";
+ } else {
+ $area = ($redistr['routearea'] == "") ? $ospfd_conf['area'] : $redistr['routearea'];
+ $redist .= " network {$redistr['routevalue']} area {$area}\n";
+ }
+ }
+ }
+
/* OSPF Settings */
$conffile .= "\n\nrouter ospf\n";
@@ -193,21 +208,18 @@ function quagga_ospfd_install_conf() {
}
}
- if (is_array($ospfd_conf['row'])) {
- foreach ($ospfd_conf['row'] as $redistr) {
- if (empty($redistr['routevalue']))
- continue;
- if (isset($redistr['redistribute'])) {
- $conffile .= " no ";
- }
- if ($redistr['routearea'] == "") {
- $conffile .= " network {$redistr['routevalue']} area {$ospfd_conf['area']}\n";
- }
- else {
- $conffile .= " network {$redistr['routevalue']} area {$redistr['routearea']}\n";
- }
- }
+ if (!empty($redist))
+ $conffile .= $redist;
+
+ if (!empty($noredist)) {
+ $conffile .= " distribute-list dnr-list out connected\n";
+ $conffile .= " distribute-list dnr-list out kernel\n";
+ $conffile .= " distribute-list dnr-list out static\n";
+ //$conffile .= " distribute-list dnr-list out ospf\n";
+ $conffile .= $noredist;
+ $conffile .= " access-list dnr-list permit any\n";
}
+
}
safe_mkdir($quagga_config_base);
$fd = fopen("{$quagga_config_base}/ospfd.conf", "w");
diff --git a/config/quagga_ospfd/quagga_ospfd.xml b/config/quagga_ospfd/quagga_ospfd.xml
index d3b6861f..d1e96efa 100644
--- a/config/quagga_ospfd/quagga_ospfd.xml
+++ b/config/quagga_ospfd/quagga_ospfd.xml
@@ -1,6 +1,6 @@
<packagegui>
<name>quagga_ospfd</name>
- <version>0.2</version>
+ <version>0.5</version>
<title>Services: Quagga OSPFd</title>
<include_file>/usr/local/pkg/quagga_ospfd.inc</include_file>
<aftersaveredirect>pkg_edit.php?xml=quagga_ospfd.xml&amp;id=0</aftersaveredirect>