aboutsummaryrefslogtreecommitdiffstats
path: root/config/openbgpd/openbgpd.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@pfSense.org>2014-02-20 15:39:46 -0300
committerRenato Botelho <garga@pfSense.org>2014-02-20 15:39:46 -0300
commit0e1a16d5aec9663660478f7936fc2b954122550a (patch)
tree9e0b3aac733417629132dccc31f83a1660edcfe1 /config/openbgpd/openbgpd.inc
parent8d0adb058e23ce6e1c571c2a7d93adbefd268ceb (diff)
parente1776b88ed746f666a7384db414e119f11f1b069 (diff)
downloadpfsense-packages-0e1a16d5aec9663660478f7936fc2b954122550a.tar.gz
pfsense-packages-0e1a16d5aec9663660478f7936fc2b954122550a.tar.bz2
pfsense-packages-0e1a16d5aec9663660478f7936fc2b954122550a.zip
Merge pull request #599 from dbaio/openbgpd
openbgpd - fix blank listenip option
Diffstat (limited to 'config/openbgpd/openbgpd.inc')
-rw-r--r--config/openbgpd/openbgpd.inc16
1 files changed, 12 insertions, 4 deletions
diff --git a/config/openbgpd/openbgpd.inc b/config/openbgpd/openbgpd.inc
index 9af83758..76aeb54f 100644
--- a/config/openbgpd/openbgpd.inc
+++ b/config/openbgpd/openbgpd.inc
@@ -90,9 +90,11 @@ function openbgpd_install_conf() {
$conffile .= "holdtime {$openbgpd_conf['holdtime']}\n";
// Specify listen ip
- if($openbgpd_conf['listenip'])
+ if(!empty($openbgpd_conf['listenip']))
$conffile .= "listen on {$openbgpd_conf['listenip']}\n";
-
+ else
+ $conffile .= "listen on 0.0.0.0\n";
+
// Specify router id
if($openbgpd_conf['routerid'])
$conffile .= "router-id {$openbgpd_conf['routerid']}\n";
@@ -127,8 +129,11 @@ function openbgpd_install_conf() {
$conffile .= "\t\t{$row['parameters']} {$row['parmvalue']} \n";
}
}
- if ($setlocaladdr == true)
+ if ($setlocaladdr == true && !empty($openbgpd_conf['listenip']))
$conffile .= "\t\tlocal-address {$openbgpd_conf['listenip']}\n";
+ else
+ $conffile .= "\t\tlocal-address 0.0.0.0\n";
+
$conffile .= "}\n";
}
}
@@ -157,8 +162,11 @@ function openbgpd_install_conf() {
$conffile .= "\t{$row['parameters']} {$row['parmvalue']} \n";
}
}
- if ($setlocaladdr == true)
+ if ($setlocaladdr == true && !empty($openbgpd_conf['listenip']))
$conffile .= "\tlocal-address {$openbgpd_conf['listenip']}\n";
+ else
+ $conffile .= "\tlocal-address 0.0.0.0\n";
+
$conffile .= "}\n";
}
}