aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-03-27 16:44:15 +0100
committerErmal <eri@pfsense.org>2013-03-27 16:44:15 +0100
commitb793e80086e481735327368f8078c0d322042ec2 (patch)
tree6744cc5f875d407be1178b3b489bd4368525fe20 /config
parent6ec163b98180eb8bacbf515ca9c9f079424da376 (diff)
downloadpfsense-packages-b793e80086e481735327368f8078c0d322042ec2.tar.gz
pfsense-packages-b793e80086e481735327368f8078c0d322042ec2.tar.bz2
pfsense-packages-b793e80086e481735327368f8078c0d322042ec2.zip
Actually the md5sigkey is directly given in hex revert partially previous commit
Diffstat (limited to 'config')
-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) {