diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/util.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 80efd9b..b23c5a3 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -713,6 +713,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); +} + /* return the configured carp interface list */ function get_configured_carp_interface_list() { global $config; |