You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2018/10/09 13:14:55 UTC

[Bug 7640] TxRep doesn't respect txrep_ipv[4|6]_mask_len

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7640

Kevin A. McGrail <km...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@apache.org
            Summary|TxRep doesn't respect       |TxRep doesn't respect
                   |txrep_ipv[4|6]_             |txrep_ipv[4|6]_mask_len
   Target Milestone|Undefined                   |3.4.3

--- Comment #1 from Kevin A. McGrail <km...@apache.org> ---
Reported on list:

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 :/



KAM: Fix is my $mask_len = $self->{conf}->{ipv4_mask_len};

Also fix the ipv6 option in like and kind

-- 
You are receiving this mail because:
You are the assignee for the bug.