From f0275faf6bb050c263e67a9ca410ab4e553c27d8 Mon Sep 17 00:00:00 2001 From: sullrich Date: Wed, 5 Aug 2009 13:24:40 -0400 Subject: Allow a neighbor when no groups are defined. Submitted-by: Evgeny.Yurchenko_AT_frontline.ca --- config/openbgpd/openbgpd.inc | 4 ++-- config/openbgpd/openbgpd_neighbors.xml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'config/openbgpd') 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; } } -- cgit v1.2.3