From 35ed1a38f02671c8e2e1bfdfbf29a0383fc1cc6d Mon Sep 17 00:00:00 2001 From: jsatoh Date: Wed, 10 Aug 2011 01:50:31 +0000 Subject: [PATCH] 2011-08-10 Junichi Satoh * lib/PandoraFMS/NetworkServer.pm: Added support for IPv6 tcp check. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4695 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 ++++ pandora_server/lib/PandoraFMS/NetworkServer.pm | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index b1a2734ff1..975939d369 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2011-08-10 Junichi Satoh + + * lib/PandoraFMS/NetworkServer.pm: Added support for IPv6 tcp check. + 2011-08-09 Miguel de Dios * DEBIAN/control: fixed the name of package and update version number. diff --git a/pandora_server/lib/PandoraFMS/NetworkServer.pm b/pandora_server/lib/PandoraFMS/NetworkServer.pm index 83ba1565a7..7ba6249c56 100644 --- a/pandora_server/lib/PandoraFMS/NetworkServer.pm +++ b/pandora_server/lib/PandoraFMS/NetworkServer.pm @@ -24,7 +24,7 @@ use threads; use threads::shared; use Thread::Semaphore; -use IO::Socket::INET; +use IO::Socket::INET6; use HTML::Entities; use POSIX qw(strftime); @@ -161,11 +161,12 @@ sub pandora_query_tcp ($$$$$$$$) { for ($counter =0; $counter < $pa_config->{'tcp_checks'}; $counter++){ my $temp; my $temp2; my $tam; - my $handle=IO::Socket::INET->new( + my $handle=IO::Socket::INET6->new( Proto=>"tcp", PeerAddr=>$ip_target, Timeout=>$pa_config->{'tcp_timeout'}, PeerPort=>$tcp_port, + Multihomed=>1, Blocking=>0 ); # Non blocking !!, very important ! if (defined ($handle)){