summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/util.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index fa06658..c4717b3 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -440,13 +440,13 @@ function find_smallest_cidr_v4($number) {
}
/* Return the previous IP address before the given address */
-function ip_before($ip) {
- return long2ip32(ip2long($ip)-1);
+function ip_before($ip, $offset = 1) {
+ return long2ip32(ip2long($ip) - $offset);
}
/* Return the next IP address after the given address */
-function ip_after($ip) {
- return long2ip32(ip2long($ip)+1);
+function ip_after($ip, $offset = 1) {
+ return long2ip32(ip2long($ip) + $offset);
}
/* Return true if the first IP is 'before' the second */
OpenPOWER on IntegriCloud