aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-07-06 13:59:25 -0400
committerjim-p <jimp@pfsense.org>2012-07-06 14:00:18 -0400
commit03a64d4591eab9c59f98e698a225adf2673100e3 (patch)
treec5f7e752499b6b6843a370310523d6db5915b5c1 /config
parenta682068a2c3f2951927443b1e5dbe018d606eb26 (diff)
downloadpfsense-packages-03a64d4591eab9c59f98e698a225adf2673100e3.tar.gz
pfsense-packages-03a64d4591eab9c59f98e698a225adf2673100e3.tar.bz2
pfsense-packages-03a64d4591eab9c59f98e698a225adf2673100e3.zip
Fixup quagga's behavior for disabling redistribution of certain networks. Fixes #2542
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>