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> |
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.