aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-11-20 04:04:49 -0600
committerChris Buechler <cmb@pfsense.org>2015-11-20 04:04:49 -0600
commitff93f32ea9da473792db0fa4eefe3e277a463989 (patch)
tree8166cb09836148cd0debe5c555e6b092925b3f06 /config
parentdf0792ee4a609e855d2990047b2c8ec782c6548f (diff)
parent1afb016d3f5d8b5db0d69c3bb018a535c1dcb796 (diff)
downloadpfsense-packages-ff93f32ea9da473792db0fa4eefe3e277a463989.tar.gz
pfsense-packages-ff93f32ea9da473792db0fa4eefe3e277a463989.tar.bz2
pfsense-packages-ff93f32ea9da473792db0fa4eefe3e277a463989.zip
Merge pull request #1188 from doktornotor/patch-1
Diffstat (limited to 'config')
-rw-r--r--config/nrpe2/nrpe2.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/nrpe2/nrpe2.inc b/config/nrpe2/nrpe2.inc
index 5a23a585..182664b8 100644
--- a/config/nrpe2/nrpe2.inc
+++ b/config/nrpe2/nrpe2.inc
@@ -29,6 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("filter.inc");
+require_once("pfsense-utils.inc");
require_once("pkg-utils.inc");
require_once("util.inc");
@@ -245,8 +246,8 @@ function nrpe2_custom_php_validation_command($post, &$input_errors) {
$input_errors[] = gettext("'Port Number' must be a valid port.");
}
if ($post['server_address'] != "") {
- if (!is_ipaddr($post['server_address'])) {
- $input_errors[] = gettext("'Bind IP Address' must be a valid IP address.");
+ if (!is_ipaddr_configured($post['server_address']) && !preg_match("/(127.0.0.1|0.0.0.0)/", $post['server_address'])) {
+ $input_errors[] = gettext("'Bind IP Address' is not a valid, locally configured IP address.");
}
}
foreach (explode(",", $post['allowed_hosts']) as $host) {