Bug 4673 - IPs not parsed properly
Summary: IPs not parsed properly
Status: RESOLVED DUPLICATE of bug 4780
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.1.0
Hardware: All other
: P5 minor
Target Milestone: 3.1.2
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on: 4485
Blocks:
  Show dependency tree
 
Reported: 2005-11-08 07:26 UTC by Eugene Pivovarov
Modified: 2006-03-08 15:25 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Pivovarov 2005-11-08 07:26:51 UTC
The header
X-Originating-IP: 10.0.0.101 via proxy [193.125.195.178]
leads to the following in the log:
originating: 10.0.0.101, , , , a, , , , , , , , , 193.125.195.178, , , 
and an error message:
[496] warn: Argument "a" isn't numeric in pack 
at /PerlApp/Mail/SpamAssassin/Util.pm line 713.

It looks like it has something to do with the definition of IP_ADDRESS in 
Mail::SpamAssassin::Constants, since it thinks that "a" is an IPv6 address.
Comment 1 Eugene Pivovarov 2005-11-09 11:41:50 UTC
I am not sure about the logic, but it seems like there are actually two bugs 
here. The first one is the definition of IP_ADDRESS, where "pure-IPv6 address" 
section should probably be something like
(?<!:)[2-3][a-f0-9]{3}\:[a-f0-9]{0,4}\:(?:[a-f0-9]{0,4}\:){0,5}[a-f0-9]{0,4}
This bug leads to the weird "originating: ..." line above.

Second, either Mail::SpamAssassin::EvalTests::check_rbl_backend or 
Mail::SpamAssassin::NetSet::contains_ip assumes that IPs are always of the form 
IPV4_ADDRESS rather than IP_ADDRESS. This bug generates an error message in 
Mail::SpamAssassin::Util::my_inet_aton about non-numeric argument in pack.
Comment 2 Theo Van Dinter 2006-03-08 23:17:04 UTC
we kluged around the Util error in bug 4485, but this would better fix the issue it looks like.
Comment 3 Daryl C. W. O'Shea 2006-03-08 23:25:15 UTC
I fixed this, specifically, in bug 4780.

*** This bug has been marked as a duplicate of 4780 ***