[smokeping-users] FPing.pm fix for source address

Gabriel Filion gabster at lelutin.ca
Sun Mar 10 17:42:56 CET 2019

On 2019-03-09 5:16 p.m., Mike Richard wrote:
> In the current FPing.pm the test for source address support is outdated.
> The current test is (line 70):
> $self->{enable}{S} = (`$binary -h 2>&1` =~ /\s-S\s/);
> This should be changed to something like:
> $self->{enable}{S} = (`$binary -h 2>&1` =~ /\s-S,/);
> The test for -O likely needs the same fix.

ah! so this was what was happening, thanks for finding that out :)

it looks like it's been changed in fping 4.x (parsing output of a
human-formatted command will invariable lead to this kind of result, but
I can't think of a better method for now :\ )

we probably want to keep the check working with 3.x, just like I had to
fix for the -4/-6 options, since there still are distributions that ship
fping 3.x. So the line would probably look like this in order to match
both cases:

    $self->{enable}{S} = (`$binary -h 2>&1` =~ /\s-S,?\s/);

would you like to submit this as a pull request? (you can also do that
on github by modifying the line directly on the web interface)
otherwise, if you prefer I can submit it and I'll make sure to credit
you as the one who figured this out.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20190310/352c3a81/attachment.pgp>

More information about the smokeping-users mailing list