summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-01-15 12:18:58 -0800
committerMark Wells <mark@freeside.biz>2014-01-15 12:18:58 -0800
commit84f6470e43578bfdc0f57f3083e5924572e88a57 (patch)
treecd861e87bca000742ee287b924d052b7a61b580c /httemplate/edit
parentdbc37c25095f050ac6284d399e25b2668fa00609 (diff)
fix address ranges for sites with old NetAddr::IP versions, #26868
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/process/addr_range.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/httemplate/edit/process/addr_range.html b/httemplate/edit/process/addr_range.html
index 6b05d23..5df0559 100644
--- a/httemplate/edit/process/addr_range.html
+++ b/httemplate/edit/process/addr_range.html
@@ -13,6 +13,11 @@
$cgi->param('end', $end->addr);
$cgi->param('start', $start->addr);
}
+ if ( $start + 0x7FFFFFFF <= $end ) {
+ # then this is going to overflow
+ return "Address ranges must be < 2^31 - 1 addresses long."
+ }
+
$cgi->param('length', $end - $start + 1);
} else {
$cgi->param('length', 1);