Can you open a bugzilla bug, please?  It sounds like you have found a
bug and it needs to be tracked.

16 is the default and the only uses of self in ip_to_awl_key are for the
mask length.

Off the cuff, I'm thinking it's referencing the wrong hash for self and
missing conf:

my $mask_len = $self->{conf}->{ipv4_mask_len};

Does that work for you?

regards,
KAM

On 10/4/2018 3:38 AM, Daniele Duca wrote:
> Hi,
>
> I'm experimenting an odd behaviour while using TxRep. I have set in my
> local.cf "txrep_ipv4_mask_len 24" , but the database is populated by
> /16 instead of the expected /24.
>
> Digging in TxRep.pm I started using dbg() to see if it would at least
> read the correct value "24" from the .cf , and confirmed that, around
> line 528, the code
>
> $self->{txrep_ipv4_mask_len} = $value;
>
> is correctly working, meaning that $value has the value of "24"
>
> The problem arise around line 1727, in the following snippet:
>
> my $mask_len = $self->{txrep_ipv4_mask_len};
> $mask_len = 16  if !defined $mask_len;
>
> In this case "$self->{txrep_ipv4_mask_len}" is empty, and the value is
> set to the default of "16".
>
> This behaviour is consistent in nine different installations with the
> following specs:
>
> Ubuntu 16.04.4 - SA 3.4.1 - Perl v5.22.1
> Ubuntu 18.04.1 - SA 3.4.2 (CPAN) - Perl v5.26.1
>
> Any thoughts? My perl-fu is not good enough to debug this :/
>
> Thanks
> Daniele Duca


-- 
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171

Reply via email to