aboutsummaryrefslogtreecommitdiffstats
path: root/config/openbgpd
diff options
context:
space:
mode:
Diffstat (limited to 'config/openbgpd')
-rw-r--r--config/openbgpd/openbgpd.inc14
1 files changed, 4 insertions, 10 deletions
diff --git a/config/openbgpd/openbgpd.inc b/config/openbgpd/openbgpd.inc
index f099e44d..08108807 100644
--- a/config/openbgpd/openbgpd.inc
+++ b/config/openbgpd/openbgpd.inc
@@ -122,11 +122,8 @@ function openbgpd_install_conf() {
$conffile .= " tcp md5sig password {$neighbor['md5sigpass']}\n";
}
if($neighbor['md5sigkey']) {
- $hex = "";
- for ($i = 0; $i < strlen($neighbor['md5sigkey']); $i++)
- $hex .= dechex(ord($neighbor['md5sigkey'][$i]));
- $setkeycf .= "add {$openbgpd_conf['listenip']} {$neighbor['neighbor']} tcp 0x1000 -A tcp-md5 0x{$hex};\n";
- $conffile .= " tcp md5sig key {$hex}\n";
+ $setkeycf .= "add {$openbgpd_conf['listenip']} {$neighbor['neighbor']} tcp 0x1000 -A tcp-md5 0x{$neighbor['md5sigkey']};\n";
+ $conffile .= " tcp md5sig key {$neighbor['md5sigkey']}\n";
}
foreach($neighbor['row'] as $row) {
$conffile .= " {$row['parameters']} {$row['parmvalue']} \n";
@@ -152,11 +149,8 @@ function openbgpd_install_conf() {
$conffile .= " tcp md5sig password {$neighbor['md5sigpass']}\n";
}
if ($neighbor['md5sigkey']) {
- $hex = "";
- for ($i = 0; $i < strlen($neighbor['md5sigkey']); $i++)
- $hex .= dechex(ord($neighbor['md5sigkey'][$i]));
- $setkeycf .= "add {$openbgpd_conf['listenip']} {$neighbor['neighbor']} tcp 0x1000 -A tcp-md5 0x{$hex};\n";
- $conffile .= " tcp md5sig key {$hex}\n";
+ $setkeycf .= "add {$openbgpd_conf['listenip']} {$neighbor['neighbor']} tcp 0x1000 -A tcp-md5 0x{$neighbor['md5sigkey']};\n";
+ $conffile .= " tcp md5sig key {$neighbor['md5sigkey']}\n";
}
$used_this_item = true;
foreach($neighbor['row'] as $row) {