aboutsummaryrefslogtreecommitdiffstats
path: root/config/openbgpd
diff options
context:
space:
mode:
Diffstat (limited to 'config/openbgpd')
-rw-r--r--config/openbgpd/openbgpd.inc10
-rw-r--r--config/openbgpd/openbgpd_neighbors.xml4
2 files changed, 12 insertions, 2 deletions
diff --git a/config/openbgpd/openbgpd.inc b/config/openbgpd/openbgpd.inc
index d23df913..297cbe13 100644
--- a/config/openbgpd/openbgpd.inc
+++ b/config/openbgpd/openbgpd.inc
@@ -121,9 +121,14 @@ function openbgpd_install_conf() {
if($neighbor['md5sigkey']) {
$conffile .= " tcp md5sig key {$neighbor['md5sigkey']}\n";
}
+ $setlocaladdr = true;
foreach($neighbor['row'] as $row) {
+ if ($row['parameters'] == "local-address")
+ $setlocaladdr = false;
$conffile .= " {$row['parameters']} {$row['parmvalue']} \n";
}
+ if ($setlocaladdr == true)
+ $conffile .= "\tlocal-address {$openbgpd_conf['listenip']}\n";
$conffile .= "}\n";
}
}
@@ -146,9 +151,14 @@ function openbgpd_install_conf() {
$conffile .= " tcp md5sig key {$neighbor['md5sigkey']}\n";
}
$used_this_item = true;
+ $setlocaladdr = true;
foreach($neighbor['row'] as $row) {
+ if ($row['parameters'] == "local-address")
+ $setlocaladdr = false;
$conffile .= " {$row['parameters']} {$row['parmvalue']} \n";
}
+ if ($setlocaladdr == true)
+ $conffile .= "\tlocal-address {$openbgpd_conf['listenip']}\n";
}
if($used_this_item)
$conffile .= "}\n";
diff --git a/config/openbgpd/openbgpd_neighbors.xml b/config/openbgpd/openbgpd_neighbors.xml
index e45baa1a..5553c022 100644
--- a/config/openbgpd/openbgpd_neighbors.xml
+++ b/config/openbgpd/openbgpd_neighbors.xml
@@ -100,13 +100,13 @@
<field>
<fielddescr>TCP-MD5 key</fielddescr>
<fieldname>md5sigkey</fieldname>
- <description>The md5 key to communicate with the peer. Does not work with Cisco BGP routers. You need the Local Addr option to be set.</description>
+ <description>The md5 key to communicate with the peer. Does not work with Cisco BGP routers. If the Local Addr option is not set listening ip will be used.</description>
<type>input</type>
</field>
<field>
<fielddescr>TCP-MD5 password</fielddescr>
<fieldname>md5sigpass</fieldname>
- <description>The md5 password to communicate with the peer. Use this when communicating with a Cisco BGP router. You need the Local Addr option to be set.</description>
+ <description>The md5 password to communicate with the peer. Use this when communicating with a Cisco BGP router. If the Local Addr option is not set listenning ip will be used.</description>
<type>input</type>
</field>
<field>