aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsullrich <sullrich@gmail.com>2009-08-05 13:24:40 -0400
committersullrich <sullrich@gmail.com>2009-08-05 13:24:40 -0400
commitf0275faf6bb050c263e67a9ca410ab4e553c27d8 (patch)
treec9dc8f74b9a597b4a4f0e0829cce936723b917c8
parentf765b4203e632dcb30ec65c04719cfd54a47588c (diff)
downloadpfsense-packages-f0275faf6bb050c263e67a9ca410ab4e553c27d8.tar.gz
pfsense-packages-f0275faf6bb050c263e67a9ca410ab4e553c27d8.tar.bz2
pfsense-packages-f0275faf6bb050c263e67a9ca410ab4e553c27d8.zip
Allow a neighbor when no groups are defined. Submitted-by: Evgeny.Yurchenko_AT_frontline.ca
-rw-r--r--config/openbgpd/openbgpd.inc4
-rw-r--r--config/openbgpd/openbgpd_neighbors.xml4
2 files changed, 6 insertions, 2 deletions
diff --git a/config/openbgpd/openbgpd.inc b/config/openbgpd/openbgpd.inc
index 3b622d66..bb44cc0b 100644
--- a/config/openbgpd/openbgpd.inc
+++ b/config/openbgpd/openbgpd.inc
@@ -81,7 +81,7 @@ function openbgpd_install_conf() {
if(is_array($openbgpd_neighbors)) {
foreach($openbgpd_neighbors as $neighbor) {
if($neighbor['groupname'] == $group['name']) {
- $conffile .= " neighbor {$neighbor['neighbor']} {\n";
+ $conffile .= " neighbor {$neighbor['neighbor']} {\n";
$conffile .= " descr \"{$neighbor['descr']}\"\n";
if($neighbor['md5sigpass'])
$conffile .= " tcp md5sig password {$neighbor['md5sigpass']}\n";
@@ -90,7 +90,7 @@ function openbgpd_install_conf() {
foreach($neighbor['row'] as $row) {
$conffile .= " {$row['paramaters']} {$row['parmvalue']} \n";
}
- $conffile .= " }\n";
+ $conffile .= "}\n";
}
}
}
diff --git a/config/openbgpd/openbgpd_neighbors.xml b/config/openbgpd/openbgpd_neighbors.xml
index b938e6fb..be3b7529 100644
--- a/config/openbgpd/openbgpd_neighbors.xml
+++ b/config/openbgpd/openbgpd_neighbors.xml
@@ -169,6 +169,10 @@
echo "found it: $counter";
}
$counter++;
+ } else {
+ $newoptions['option'][0]['name'] = "";
+ $newoptions['option'][0]['value'] = "";
+ $pkg['fields']['field'][2]['options'] =$newoptions;
}
}
</custom_php_command_before_form>