aboutsummaryrefslogtreecommitdiffstats
path: root/config/openbgpd/openbgpd.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-03-28 12:33:24 +0100
committerErmal <eri@pfsense.org>2013-03-28 12:33:24 +0100
commit7c702b5a98c27526c780af46dfc8494c9a6cabbc (patch)
tree5cc30b44e1194194715354b51ae031fe6d324f62 /config/openbgpd/openbgpd.inc
parent5072ac5044cb87838c7de8eebd5e8d3072667fb7 (diff)
downloadpfsense-packages-7c702b5a98c27526c780af46dfc8494c9a6cabbc.tar.gz
pfsense-packages-7c702b5a98c27526c780af46dfc8494c9a6cabbc.tar.bz2
pfsense-packages-7c702b5a98c27526c780af46dfc8494c9a6cabbc.zip
Do not make mandatory the local addr but use the listenip if local address is not set to easy configuration same as was previously done with setkey
Diffstat (limited to 'config/openbgpd/openbgpd.inc')
-rw-r--r--config/openbgpd/openbgpd.inc10
1 files changed, 10 insertions, 0 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";