diff options
author | Mark Wells <mark@freeside.biz> | 2014-01-15 12:18:58 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2014-01-15 12:18:58 -0800 |
commit | 84f6470e43578bfdc0f57f3083e5924572e88a57 (patch) | |
tree | cd861e87bca000742ee287b924d052b7a61b580c /httemplate/edit/process/addr_range.html | |
parent | dbc37c25095f050ac6284d399e25b2668fa00609 (diff) |
fix address ranges for sites with old NetAddr::IP versions, #26868
Diffstat (limited to 'httemplate/edit/process/addr_range.html')
-rw-r--r-- | httemplate/edit/process/addr_range.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/httemplate/edit/process/addr_range.html b/httemplate/edit/process/addr_range.html index 6b05d23a5..5df05596e 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); |