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:00 UTC

[Bug 7640] New: TxRep doesn't respect txrep_ipv[4|6]_

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

            Bug ID: 7640
           Summary: TxRep doesn't respect txrep_ipv[4|6]_
           Product: Spamassassin
           Version: 3.4.2
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Plugins
          Assignee: dev@spamassassin.apache.org
          Reporter: kmcgrail@apache.org
  Target Milestone: Undefined

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

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

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7640

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |me@junc.eu

--- Comment #6 from Kevin A. McGrail <km...@apache.org> ---
*** Bug 7694 has been marked as a duplicate of this bug. ***

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

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

Posted by bu...@bugzilla.spamassassin.org.
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.

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

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7640

Giovanni Bechis <gi...@paclan.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #5 from Giovanni Bechis <gi...@paclan.it> ---
Fixed with commit r1843622.

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

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

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7640

--- Comment #3 from Kevin A. McGrail <km...@apache.org> ---
(In reply to Giovanni Bechis from comment #2)
> Created attachment 5604 [details]
> Txrep mask len fix
> 
> This should be enough, I think it's just a typo in the original code.

I think the hash lookup is wrong.  It should be in the conf hash.

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

I think the typo is missing ->conf

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

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

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7640

Giovanni Bechis <gi...@paclan.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5604|0                           |1
        is obsolete|                            |

--- Comment #4 from Giovanni Bechis <gi...@paclan.it> ---
Created attachment 5605
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5605&action=edit
Mask len fix

New patch that uses conf hash to store configuration values.
IMHO $self->{factor} should be removed as well and $self->{conf}->{factor}
should be used as well, I will fix it in a separate commit.

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

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

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7640

Giovanni Bechis <gi...@paclan.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovanni@paclan.it

--- Comment #2 from Giovanni Bechis <gi...@paclan.it> ---
Created attachment 5604
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5604&action=edit
Txrep mask len fix

This should be enough, I think it's just a typo in the original code.

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