[Rt-commit] rtir branch, ipv6, updated. 2.6.0-25-gfccac10
Ruslan Zakirov
ruz at bestpractical.com
Tue Jul 12 17:53:17 EDT 2011
The branch, ipv6 has been updated
via fccac10f425064942296e9fa6d235415aadf87aa (commit)
from 5cf3e5b3aa706585fca1ebb4b1ef1b9953b47674 (commit)
Summary of changes:
lib/RT/IR.pm | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit fccac10f425064942296e9fa6d235415aadf87aa
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Jul 13 01:52:23 2011 +0400
properly limit by IPv6 boundaries
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 8ca0b25..bb433bd 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -422,6 +422,11 @@ wrap 'RT::Tickets::_CustomFieldLimit',
$_ = ParseIP( $_ ) for $start_ip, $end_ip;
($start_ip, $end_ip) = ($end_ip, $start_ip) if $start_ip gt $end_ip;
+ my (@limit) = $start_ip !~ /:/
+ ? (qw(000.000.000.000 255.255.255.255))
+ : (join(':', ('0000')x8), join(':', ('ffff')x8))
+ ;
+
my ($tickets, $field, $op, $value, %rest) = @_[0..($#_-1)];
$tickets->_OpenParen;
unless ( $op =~ /NOT|!=|<>/i ) { # positive equation
@@ -437,12 +442,12 @@ wrap 'RT::Tickets::_CustomFieldLimit',
# as well limit borders so DB optimizers can use better
# estimations and scan less rows
$tickets->_CustomFieldLimit(
- $field, '>=', '000.000.000.000', %rest,
+ $field, '>=', $limit[0], %rest,
SUBKEY => $rest{'SUBKEY'}. '.Content',
ENTRYAGGREGATOR => 'AND',
);
$tickets->_CustomFieldLimit(
- $field, '<=', '255.255.255.255', %rest,
+ $field, '<=', $limit[1], %rest,
SUBKEY => $rest{'SUBKEY'}. '.LargeContent',
ENTRYAGGREGATOR => 'AND',
);
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list