summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/util.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 968cb72..6e91eb6 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -794,6 +794,11 @@ function is_inrange_v6($test, $start, $end) {
return false;
}
+/* returns true if $test is in the range between $start and $end */
+function is_inrange($test, $start, $end) {
+ return is_ipaddrv6($test) ? is_inrange_v6($test, $start, $end) : is_inrange_v4($test, $start, $end);
+}
+
/* XXX: return the configured carp interface list */
function get_configured_carp_interface_list() {
global $config;
OpenPOWER on IntegriCloud