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

Gabriel Filion gabster at lelutin.ca
Tue Mar 12 05:09:41 CET 2019


On 2019-03-11 4:43 p.m., mtr.biz at gmail.com wrote:
> It would be easier for me if you made the change. Thanks!

Ok sure! I just wanted to give you a chance to have a contribution
accepted, and not just jump in and beat you to the finish line.

I'll prepare a pull request with this now

>> On Mar 10, 2019, at 11:42 AM, Gabriel Filion <gabster at lelutin.ca> wrote:
>>
>>> 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/20190312/e54a3099/attachment.pgp>


More information about the smokeping-users mailing list