Re: libspf2: "ip6" mechanism not working ?

Benoit Branciard <[email protected]> Tue, 02 Nov 2010 17:13:07 +0100
Newsgroups gmane.mail.spam.spf.devel
Message-ID <[email protected]>
Hi,

below is a message I posted some months ago about "ip6:" SPF mechanism=20
not being handled correctly by libspf2.

Googling in the mailing list archives, I found someone already=20
encountered the problem and submitted a patch:

http://www.gossamer-threads.com/lists/spf/devel/35098

(or=20
http://www.listbox.com/member/archive/1007/2009/09/sort/time_rev/page/1/e=
ntry/0:2/20090927002136:3C4C62B2-AB1D-11DE-A128-DAF452F05D7F/,=20
but without the patch attached).

I tested this patch (basically replacing an occurrence of=20
INET_ADDRSTRLEN by INET6_ADDRSTRLEN in spf_compile.c), and I confirm it=20
solves the "ip6" problem.

Could this patch be included in future releases of libspf2 ?


Le 18/02/2010 20:15, Benoit Branciard a =E9crit :
> Hello,
>
> If I publish a SPF record like this:
>
> testspf.univ-paris1.fr descriptive text "v=3Dspf1 ip6:2001:660:3305::71
> ip4:193.55.96.71 -all"
>
> then execute some queries on it using libspf2 (through the spfquery
> command):
>
> spfquery -i 193.55.96.71 -s testspf.univ-paris1.fr
> -> pass
>
> spfquery -i 2001:660:3305::71 -s testspf.univ-paris1.fr
> -> fail
>
> I would have expected both queries to return "pass".
>
> Tested lipspf2/spfquery versions are: 1.2.5 and 1.2.9, with same faulty
> results.
> Testing environment is on Debian Lenny, libspf2 are from Debian package=
s
> (Lenny and Sid).
>
> I arrived to the conclusion of a libspf2 bug after seeing a
> libspf2-linked mail filter (milter-greylist) not behave as expected on
> incoming SPF-enabled IPv6 SMTP connexions. After thoroughly examining
> the faulty SPF record, I concluded the SPF test should have passed,
> whereas it failed. Then I did some manual queries using spfquery on the
> same SPF record with same results. I then created the above simple test
> SPF record which obviously illustrates the bug.
>
> Could someone have a look at it ?
>
>
> Best regards,
>


--=20
Benoit BRANCIARD

CRIR - SIS
Centre de Ressources Informatiques et du R=E9seau,
Service Infrastructures
http://crir.univ-paris1.fr
Universit=E9 Paris 1 Panth=E9on-Sorbonne

Tel. 01 44 07 89 68

--=20
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.