[milters] Archive

Lists Index Date Thread Search

Article: 764
From: Anthony Howe
Date: 2005-12-13 08:22:27 -0500
Subject: Re: milter-spiff

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Anthony Howe wrote:
>> Again, their declaration is perfectly valid, just as I could  
>> legitimately describe RFC1918 space as "10.123.45.67/8" and it would  
>> still be a perfectly "accurate" representation of the entire network.  
>> It's just brain-dead. :-P
> 
> Ugh. And its a bug in the spf.c code. The mask is applied ONLY to the IP 
> addrss being tested and not the network address specified. Easy enough 
> to fix, but damn annoying. I should have a libsnert update shortly.

Here's a patch:

cd com/snert/src/lib
patch <<EOT
--- mail/spf.c.orig     2005-12-08 09:24:09.046875000 -0500
+++ mail/spf.c  2005-12-13 08:19:58.328125000 -0500
@@ -271,7 +271,7 @@
                 mask[prefix] = (unsigned char) ((signed char) 0x80 >> 
(partial-1));

         for (i = 0; i < sizeof (mask); i++) {
-               if ((ipv6[i] & mask[i]) != net[i])
+               if ((ipv6[i] & mask[i]) != (net[i] & mask[i]))
                         return 0;
         }

EOT
make
cd ../milter-spiff
make clean build

Its a one line change.

-- 
Anthony C Howe                                 +33 6 11 89 73 78
http://www.snert.com/       ICQ:
7116561         AIM: Sir Wumpus

Sendmail Anti-Spam Solutions           http://www.snertsoft.com/
                                             We Serve Your Server

Lists Index Date Thread Search