Skip Menu |
 

This queue is for tickets about the Net-Ping CPAN distribution.

Report information
The Basics
Id: 131919
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Net-Ping

People
Owner: RURBAN [...] cpan.org
Requestors: Patrick [...] Cambre.Solutions
Cc:
AdminCc:

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



Subject: Net::Ping issues
Date: Fri, 21 Feb 2020 12:51:27 +0100
To: bug-Net-Ping [...] rt.cpan.org
From: Patrick Heesom <Patrick [...] Cambre.Solutions>
Download (untitled) / with headers
text/plain 926b
Hi, I think I've found a couple of problems with the current (2.72) version of Net::Ping. I've attached (separate) patches to fix. 1. If options are passed to the constructor in a hash reference, some of them are lost, because although the constructor code pushes them into $self, it then checks the local variables ($timeout, $data_size, etc) for correctness, and replaces the contents of $self->{...} with those variables. 2. In an icmp (v4) ping, if there is additional data (ie the data_size parameter to the constructor was not zero), the checks on a reply packet will always fail, because they don't take into account the extra length of the returned packet. In case it matters, both of these are on Perl v5.30.1 running on Linux 5.4.19-200.fc31.x86_64 (Fedora 31). I hope that's useful! Best regards, -Patrick Heesom Cambre Solutions SRL Tél: +32 493 33 08 17 Poste: Ave des Grenadiers 4/b18, 1050 Ixelles

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #131919] Net::Ping issues
Date: Fri, 21 Feb 2020 13:03:08 +0100
To: bug-Net-Ping [...] rt.cpan.org
From: Reini Urban <reini.urban [...] gmail.com>
Download (untitled) / with headers
text/plain 1.4k
Great catches! But I'm currently away for a few days, will check next week. Patrick Heesom via RT <bug-Net-Ping@rt.cpan.org> schrieb am Fr., 21. Feb. 2020, 12:51: Show quoted text
> Fri Feb 21 06:51:43 2020: Request 131919 was acted upon. > Transaction: Ticket created by Patrick@Cambre.Solutions > Queue: Net-Ping > Subject: Net::Ping issues > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: Patrick@Cambre.Solutions > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=131919 > > > > Hi, > > I think I've found a couple of problems with the current (2.72) version > of Net::Ping. I've attached (separate) patches to fix. > > 1. If options are passed to the constructor in a hash reference, some of > them are lost, because although the constructor code pushes them into > $self, it then checks the local variables ($timeout, $data_size, etc) > for correctness, and replaces the contents of $self->{...} with those > variables. > > 2. In an icmp (v4) ping, if there is additional data (ie the data_size > parameter to the constructor was not zero), the checks on a reply packet > will always fail, because they don't take into account the extra length > of the returned packet. > > In case it matters, both of these are on Perl v5.30.1 running on Linux > 5.4.19-200.fc31.x86_64 (Fedora 31). > > I hope that's useful! > > Best regards, > > -Patrick Heesom > > Cambre Solutions SRL > Tél: +32 493 33 08 17 > Poste: Ave des Grenadiers 4/b18, 1050 Ixelles > >
Smoking in the rt131919 branch, looks good -- Reini Urban
Fixed with 2.73, thanks


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.