You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2005/08/12 19:41:07 UTC

Re: IPv6 broken by my_inet_aton?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Theo Van Dinter writes:
> On Fri, Aug 12, 2005 at 05:07:51PM +0200, Benoit Panizzon wrote:
> > sub my_inet_aton { unpack("N", pack("C4", split(/\./, $_[0]))) }
> > 
> > What is that done for? Why would somebody want to pack an IPv4 address into a 
> > binary notation as Net::DNS and Net::IP don't need this packing stuff?
> 
> Probably because we need it packed for other things.
> 
> Grepping for "my_inet_aton" in the code leads me to the NetSet module:
> 
> # Mail::SpamAssassin::NetSet - object to manipulate CIDR net IP addrs
> 
> Also, the URIDNSBL plugin and Dns module seem to use it when they're
> matching results.
> 
> > This breaks the whole IPv6 support.
> 
> I don't think SA currently supports IPv6 for RBLs, so it's not actually
> breaking anything.

Yep.  the DNSBLs I know of currently use the reversed-quad notation, which
is explicitly IPv4-only; what's needed *first* for IPv6 support, is a
standard (or de-facto std) notation for IPv6 addresses in a DNSBL, *then*
the SpamAssassin code would have to be written, using its own equivalent
of my_inet_aton() (or changing that function).

BTW I would suggest opening a bugzilla entry for this work; we use BZ for
that kind of thing as it's easier to find, and gives us a URL to point to.

- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFC/N8zMJF5cimLx9ARAo/PAJ9k6D891tvDznCjt1gZ6wFuU3BzlQCfS+W0
5rRWvhKbbhuGcKJrtMM8TZk=
=8CA+
-----END PGP SIGNATURE-----