[Bug 79360] Net::Ping succeeds regardless of port assignment

bugzilla at redhat.com bugzilla at redhat.com
Thu Jan 19 23:19:07 UTC 2006

Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: Net::Ping succeeds regardless of port assignment


jvdias at redhat.com changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |CLOSED
         Resolution|                            |NOTABUG
                 CC|                            |ville.skytta at iki.fi

------- Additional Comments From jvdias at redhat.com  2006-01-19 18:19 EST -------
I'm not sure this is actually a bug.

As the Net::Ping manual states:

   $p->service_check( { 0 | 1 } );
        Set whether or not the connect behavior should enforce remote service 
        availability as well as reachability.  Normally, if the remote server 
        reported ECONNREFUSED, it must have been reachable because of the 
        status packet that it reported.  With this option enabled, the full   
        three-way tcp handshake must have been established successfully before
        it will claim it is reachable.

So adding 
before the 
in the example script attachment makes it only succeed if a tcp server
is actually listening to the $port on $host, which I believe was the 
intent, and which resolves the problem described in this bug.

Yes, I agree if a port is specified for a TCP ping, a full connect(2) attempt
should be made, but this is not how Net::Ping was designed or documented to
work - a tcp ping only verifies that the host is reachable, unless the 
service_check(1) option is specified .

Hence, this bug is being closed as NOTABUG - if you disagree, please re-open it.

Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the Fedora-perl-devel-list mailing list