Skip Menu |

This queue is for tickets about the ClamAV-Client CPAN distribution.

Report information
The Basics
Id: 35998
Status: new
Priority: 0/
Queue: ClamAV-Client

People
Owner: Nobody in particular
Requestors: S.S.Maslov [...] novotelecom.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: socket_host value with multiply dns records
Date: Mon, 19 May 2008 15:37:35 +0700
To: bug-ClamAV-Client [...] rt.cpan.org
From: Сергей Маслов <S.S.Maslov [...] novotelecom.ru>
Hi. When using socket_host value with multiply dns records for STREAM clamav scanning, resolve of socket_host can be multiply times, so second connect could be to another IP-address, so scan_stream exits with an error. Attached patch can resolve this issue. Thanks for advance, and sorry for bad English. -- Sergey Maslov.
--- Client.pm.orig 2007-05-17 13:37:00.000000000 +0700 +++ Client.pm 2008-05-19 15:22:35.788596000 +0700 @@ -227,6 +227,11 @@ } } + $options{packed_ip} = gethostbyname($options{socket_host}); + if (defined $options{packed_ip}) { + $options{socket_host} = inet_ntoa($options{packed_ip}); + } + my $self = { socket_type => $options{socket_type}, socket_name => $options{socket_name},