[Pkg-dspam-misc] Bug#644794: [PATCH] Fix buffer lengths for IPv6 adresses logging

Thomas Preud'homme robotux at celest.fr
Tue Oct 11 18:07:33 UTC 2011


Le lundi 10 octobre 2011 00:15:15, Thomas Preud'homme a écrit :
> Le dimanche 9 octobre 2011 19:16:58, Thomas Preud'homme a écrit :
> > Le dimanche 9 octobre 2011 15:11:10, Julien Valroff a écrit :
> > > Hi,
> > > 
> > > Here is an attempt to fix Debian bug #644794 [0] stating the logged
> > > IPv6 addresses are truncated.
> > > 
> > > Cheers,
> > > Julien
> > 
> > I would like to propose a patch myself too. Size of ip array should be
> > 128 but I'm thinking about replacing this array by a more appropriate
> > structure (like union of struct in_addr or struct in6_addr). but I want
> > to check it's adequate first.
> > 
> > Congrats for your quick reaction Julien.
> 
> Ok, it will take more time than expected because there is also some other
> place in the code which I believe assume IPv4.
> 
> egrep -In "\[32\]" **/*.c | wc -l gives 11
> 
> One exemple is in src/daemon.c around line 250. I transformed local_addr
> and remote_addr in an union of sockaddr_in and sockaddr_in6 but then the
> code needs to be adapted. I will try to finish the patch tomorrow.

The patch is not completely finished but I'm going in holidays for a week so I 
prefer to post it. I didn't changed the handling of remote_addr in THREAD_CTX 
structure. Also I didn't try to compile so there is probably lots of mistake 
left.

I discovered while writing the last part in daemon.c that IPv4 can be handled 
transparently through IPv6 API so probably some simplification can be done in 
dspam.c

Anyway, it's better than nothing.

Best regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dspam_add_ipv6_support.patch
Type: text/x-patch
Size: 7356 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dspam-misc/attachments/20111011/83e33e13/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-dspam-misc/attachments/20111011/83e33e13/attachment.pgp>


More information about the Pkg-dspam-misc mailing list