Skip Menu |

This queue is for tickets about the IO-Socket-PortState CPAN distribution.

Report information
The Basics
Id: 28955
Status: open
Priority: 0/
Queue: IO-Socket-PortState

People
Owner: Nobody in particular
Requestors: eg [...] bsd.lt
Cc:
AdminCc:

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



Subject: udp port checking
Date: Thu, 23 Aug 2007 13:35:17 +0300
To: bug-IO-Socket-PortState [...] rt.cpan.org
From: Edmondas Girkantas <eg [...] bsd.lt>
Hi, check_ports() does not check properly udp ports, try to check your localhost for 53 (dns) port: #!/usr/bin/perl use strict; use warnings; require 'PortState.pm'; my %porthash = ( udp => { 53 => { name => 'DNS' }, }, ); my $host = '127.0.0.1'; my $timeout = 5; IO::Socket::PortState::check_ports( $host, $timeout, \%porthash ); for my $proto ( keys %porthash ) { for ( keys %{ $porthash{$proto} } ) { print "$proto $_ is not open " . ( $porthash{$proto}->{$_}-> {name} ) if !$porthash{$proto}->{$_}->{open}; } } You must listen for icmp messages. Read more about that at: http://www.decorous.co.uk/perl.html PortState version: 0.03 Perl version: 5.8.8 Operating system: FreeBSD 6.2-STABLE -- Edmondas Girkantas <eg@bsd.lt>
Subject: Re: [rt.cpan.org #28955] udp port checking
Date: Thu, 23 Aug 2007 06:55:51 -0500
To: bug-IO-Socket-PortState [...] rt.cpan.org
From: Daniel Muey <webmaster [...] simplemood.com>
thanks I'll take a look On Aug 23, 2007, at 5:36 AM, Edmondas Girkantas via RT wrote: Show quoted text
> > Thu Aug 23 06:36:08 2007: Request 28955 was acted upon. > Transaction: Ticket created by eg@bsd.lt > Queue: IO-Socket-PortState > Subject: udp port checking > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: eg@bsd.lt > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28955 > > > > Hi, > > check_ports() does not check properly udp ports, try to check your > localhost for 53 (dns) port: > > #!/usr/bin/perl > > use strict; > use warnings; > > require 'PortState.pm'; > > my %porthash = ( udp => { 53 => { name => 'DNS' }, }, ); > > my $host = '127.0.0.1'; > my $timeout = 5; > > IO::Socket::PortState::check_ports( $host, $timeout, \%porthash ); > > for my $proto ( keys %porthash ) { > for ( keys %{ $porthash{$proto} } ) { > print "$proto $_ is not open " . ( $porthash{$proto}->{$_}-> > {name} ) if !$porthash{$proto}->{$_}->{open}; > } > } > > You must listen for icmp messages. Read more about that at: > http://www.decorous.co.uk/perl.html > > PortState version: 0.03 > Perl version: 5.8.8 > Operating system: FreeBSD 6.2-STABLE > > -- > Edmondas Girkantas <eg@bsd.lt> >