On Fri, May 24, 2013 at 02:11:58PM -0700, Landon wrote:
>    I'm wondering if this is the best way to stop RTIR from detecting CIDR 
> ranges. I've been
>    looking into /opt/rt4/local/plugins/RT-IR/lib/RT/Action/RTIR_FindIP.pm and 
> modified the
>    following section:
>    elsif ( $4 && defined $5 ) { # IPv4/mask
>    next; # Do not add IPv4 ranges to tickets
>    my $cidr = join( '.', map $_||0, (split /\./, $4)[0..3] ) ."/$5";
>    my $range = (Net::CIDR::cidr2range( $cidr ))[0] or next;
>    $spots_left -= $self->AddIP(
>    IP => $range, CustomField => $cf, Skip => \%existing
>    );
>    }
>    Is this the best way? Or is there something else I should have done 
> instead?

It's almost impossible for me to parse your changes since the
whitespace has been completely lost.

Can you instead post a unified diff (diff -u) of your change?

Also, if you're going to change RT/extension code, you should be using
local/lib instead of hacking in place.  Otherwise upgrading will be...
fun.

-kevin

Attachment: pgpZ_OE3wm6Ug.pgp
Description: PGP signature

_______________________________________________
Rtir mailing list
[email protected]
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rtir

Reply via email to