]> git.gsnw.org Git - fping.git/log
fping.git
2 weeks agoRelease v5.3 develop
David Schweikert [Thu, 2 Jan 2025 17:00:09 +0000 (18:00 +0100)]
Release v5.3

3 weeks agoPrepare 5.3-rc3
David Schweikert [Fri, 27 Dec 2024 15:39:15 +0000 (16:39 +0100)]
Prepare 5.3-rc3

4 weeks agoadjust ICMP Timestamp output
Erik Auerswald [Sun, 15 Dec 2024 17:52:10 +0000 (18:52 +0100)]
adjust ICMP Timestamp output

* print TOS and/or TTL after the timestamps
* use the same output format with and without loop or count modes
* omit the comma in front of the timestamps with -a, --alive
* slightly extend man page description of --icmp-timestamp
* adjust existing ICMP Timestamp tests to output format changes
* add tests for some combinations of --icmp-timestamp with -a, -e,
  --print-tos, and --print-ttl

5 weeks agoPrepare 5.3-rc2
David Schweikert [Sat, 14 Dec 2024 17:50:41 +0000 (18:50 +0100)]
Prepare 5.3-rc2

5 weeks agosupport --print-{tos,ttl} with -cN, -CN, and -l
Erik Auerswald [Mon, 9 Dec 2024 18:41:40 +0000 (19:41 +0100)]
support --print-{tos,ttl} with -cN, -CN, and -l

This addresses GitHub issue #367.

5 weeks agoCHANGELOG.md tweaks
Erik Auerswald [Wed, 11 Dec 2024 15:13:14 +0000 (16:13 +0100)]
CHANGELOG.md tweaks

6 weeks agoPrepare 5.3-rc1
David Schweikert [Sun, 8 Dec 2024 09:27:10 +0000 (10:27 +0100)]
Prepare 5.3-rc1

6 weeks agoci: Upgrade actions/upload-artifact to v4
German Service Network [Sat, 30 Nov 2024 12:53:02 +0000 (13:53 +0100)]
ci: Upgrade actions/upload-artifact to v4

6 weeks agoPrepare v5.3 release: CHANGELOG
German Service Network [Sat, 7 Dec 2024 07:51:58 +0000 (08:51 +0100)]
Prepare v5.3 release: CHANGELOG

6 weeks agoadd local receive timestamp to --icmp-timestamp
Erik Auerswald [Sat, 30 Nov 2024 19:15:20 +0000 (20:15 +0100)]
add local receive timestamp to --icmp-timestamp

This addresses GH issue #361.

6 weeks agoensure IPv4 is used with --icmp-timestamp
Erik Auerswald [Sat, 30 Nov 2024 19:02:46 +0000 (20:02 +0100)]
ensure IPv4 is used with --icmp-timestamp

The ICMP Timestamp message is defined for IPv4, but not for IPv6.

Before, combining --icmp-timestamp with an IPv6 address or a DNS
name for a dual-stacked target on a dual-stacked system resulted
in sending ICMPv6 Echo over IPv6.

Now, DNS names for dual-stacked hosts just work, i.e., fping uses
IPv4 with --icmp-timestamp.  Combining --icmp-timestamp with an
IPv6 address or an IP6-only DNS name now fails.

6 weeks agouse correct data size when sending ICMP Timestamp
Erik Auerswald [Sat, 30 Nov 2024 18:38:05 +0000 (19:38 +0100)]
use correct data size when sending ICMP Timestamp

ICMP Timestamp messages have a fixed size.  The data portion
following the ICMP header comprises 12 octets to hold three
timestamps of 4 octets each.

Giving the --icmp-timestamp option now automatically sets the
data size to 12 octets.

Error out when -b N is used together with --icmp-timestamp.

Adjust man page to mention incompatibility of -b N, --size=N
with --icmp-timestamp.  Also mention in man page that
cap_net_raw can be used instead of root privileges for ICMP
Timestamp.

6 weeks agostricter response type checking
Erik Auerswald [Sat, 30 Nov 2024 18:12:28 +0000 (19:12 +0100)]
stricter response type checking

When sending an ICMP Echo message, accept only an Echo Reply
message as a normal response.  When sending an ICMP Timestamp
message, accept only an ICMP Timestamp message as a normal
response.

This could matter when multiple fping processes are running
in parallel, some using Echo, others Timestamp messages.

6 weeks agoinitialize ICMP timestamp fields
Erik Auerswald [Sat, 30 Nov 2024 17:48:44 +0000 (18:48 +0100)]
initialize ICMP timestamp fields

Initializing the timestamp variables avoids accesssing uninitialized
memory when using --icmp-timestamp with an IPv6 target.

Per RFC 792, setting the high bit indicates a non-standard value,
i.e., this is not a valid timestamp.  Thus this value can be
distinguished from valid timestamps.

7 weeks agoAdd autotrigger for changes in develop to the azure-pipeline
German Service Network [Sun, 17 Nov 2024 08:46:13 +0000 (09:46 +0100)]
Add autotrigger for changes in develop to the azure-pipeline

2 months agoAdd docker build to azure-pipline
German Service Network [Mon, 14 Oct 2024 21:18:55 +0000 (23:18 +0200)]
Add docker build to azure-pipline

2 months agoUpdate CHANGELOG.md for ICMP Timestamp
German Service Network [Tue, 29 Oct 2024 06:06:49 +0000 (07:06 +0100)]
Update CHANGELOG.md for ICMP Timestamp

2 months agoICMP Timestamp: Checking reply_buf_len size and changing the timestamp variable from...
German Service Network [Mon, 21 Oct 2024 11:25:32 +0000 (13:25 +0200)]
ICMP Timestamp: Checking reply_buf_len size and changing the timestamp variable from long to unit32_t

2 months agoAdd manpage entry for ICMP Timestamp
German Service Network [Wed, 16 Oct 2024 06:35:40 +0000 (08:35 +0200)]
Add manpage entry for ICMP Timestamp

2 months agoAllow the parameter --icmp-timestamp only without --size
German Service Network [Sun, 13 Oct 2024 21:50:04 +0000 (23:50 +0200)]
Allow the parameter --icmp-timestamp only without --size

2 months agoChane ICMP Timestamp format when per_recv_flag true
German Service Network [Sun, 13 Oct 2024 21:00:51 +0000 (23:00 +0200)]
Chane ICMP Timestamp format when per_recv_flag true

2 months agoChange ICMP proto number 13 and 14 to name ICMP_TSTAMP and ICMP_TSTAMPREPLY
German Service Network [Wed, 9 Oct 2024 19:55:56 +0000 (21:55 +0200)]
Change ICMP proto number 13 and 14 to name ICMP_TSTAMP and ICMP_TSTAMPREPLY

2 months agoAdd feature: support ICMP type 13/14 timestamps
German Service Network [Tue, 8 Oct 2024 18:40:03 +0000 (20:40 +0200)]
Add feature: support ICMP type 13/14 timestamps

2 months agoci: Upgrade actions/upload-artifact to v3
Petr Vorel [Fri, 18 Oct 2024 19:30:50 +0000 (21:30 +0200)]
ci: Upgrade actions/upload-artifact to v3

This fixes error in CI:
Error: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v2`.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
3 months agoDockerfile support architekture 386 change distribution from ubuntu to debian
German Service Network [Sun, 22 Sep 2024 11:12:03 +0000 (13:12 +0200)]
Dockerfile support architekture 386 change distribution from ubuntu to debian

4 months agoallow combination of -a with --print-tos
Erik Auerswald [Sat, 24 Aug 2024 18:13:37 +0000 (20:13 +0200)]
allow combination of -a with --print-tos

This is similar to how -e, --elapsed works.
Also adjust -h output regarding --print-tos.

4 months agoFix warning unused parameter 'reply_timestamp' under macOS
German Service Network [Sat, 24 Aug 2024 20:43:08 +0000 (22:43 +0200)]
Fix warning unused parameter 'reply_timestamp' under macOS

4 months agoPrint returned TTL value
Nuno Alves [Wed, 21 Aug 2024 22:07:28 +0000 (23:07 +0100)]
Print returned TTL value

Co-authored-by: Luís Fonseca <luis@lhf.pt>
4 months agodocs: adjust description for --print-tos
Erik Auerswald [Sat, 24 Aug 2024 16:42:59 +0000 (18:42 +0200)]
docs: adjust description for --print-tos

Every IPv4 packet has a TOS byte.  Every IPv6 packet has a TC byte.
But fping can only read it when using raw sockets, and only for IPv4.

4 months agoIncrease maximum -b value to 65507
Petr Vorel [Mon, 12 Aug 2024 12:39:55 +0000 (14:39 +0200)]
Increase maximum -b value to 65507

Correct definitions: maximum theoretical IPv4 packet size and minimum
IPv4 header size (previously probably IPv6 size was used).

Because fping does not know ahead whether address is IPv4 or IPv6 assume
IPv4. Previously fping allowed only 65488, but real maximum for IPv4 on
Linux is 65507 (IPv6 would allow 65527 follow the current approach and
allow smaller value than reachable for IPv6).

Update test affected by this change. While at this, test 65508 (one
above the limit) instead of 65509.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
5 months agoCI: use chmod and File::Copy's copy, not system
Erik Auerswald [Sat, 17 Aug 2024 17:04:13 +0000 (19:04 +0200)]
CI: use chmod and File::Copy's copy, not system

Before, ci/test-11-unpriv.pl used Perl's "system" function
to execute a Unix command line to copy a file and change the
permissions of the copy.

Now, the Perl functions "copy" (from File::Copy) and "chmod"
are used instead.

5 months agoCI: use File::Temp to create temporary directory
Erik Auerswald [Sun, 11 Aug 2024 14:56:48 +0000 (16:56 +0200)]
CI: use File::Temp to create temporary directory

Before, ci/test-11-unpriv.pl used a hard-coded file name of
/tmp/fping.copy to create an unprivileged copy of fping.  This
file was not deleted after it was no longer used.

Now, the unprivileged fping copy is created in a temporary
directory that is deleted after all tests from the file.

This addresses GH issue #339.

5 months agofix -k, --fwmark with setuid fping executable
Erik Auerswald [Mon, 29 Jul 2024 17:38:16 +0000 (19:38 +0200)]
fix -k, --fwmark with setuid fping executable

* Setting the SO_MARK socket option requires root privileges (or
  CAP_NET_ADMIN), thus temporarily elevate privileges for this
  operation, if possible, by using the p_setsockopt() function.
  This allows to use -k, --fwmark with setuid fping.
* Adjust README.md since setuid now works for -k, --fwmark.
* Remove "sudo" from testing -k since it is no longer needed.
* Test failure of setting firewall mark without privileges or
  capabilities for both IPv4 and IPv6.

5 months agotest error resolving host name
Erik Auerswald [Sun, 28 Jul 2024 18:56:56 +0000 (20:56 +0200)]
test error resolving host name

The top level domain '.invalid' is reserved for such tests.

5 months agobasic test for -d, --rdns
Erik Auerswald [Sun, 28 Jul 2024 18:36:01 +0000 (20:36 +0200)]
basic test for -d, --rdns

Usually, -d gives the same result as -n.  Test this.

When the target is a name that resolves to an IP, but the IP
does not resolve to the same name or any name at all, the
output differs.  This is harder to test, because this is
usually seen as a misconfiguration, so leave this out for now.

5 months agomore tests with reply source != target
Erik Auerswald [Sun, 28 Jul 2024 18:27:09 +0000 (20:27 +0200)]
more tests with reply source != target

The tests for --check-source verify that Echo reply packets
from a source IP that was not used as the target of the Echo
request are not accepted.  It does so for default fping, for
use with -c, and for use with -C.  Test if the source address
is really printed without --check-source, but with -c or -C.

5 months agotest --print-tos with an IPv6 target
Erik Auerswald [Sun, 28 Jul 2024 17:55:13 +0000 (19:55 +0200)]
test --print-tos with an IPv6 target

Currently, --print-tos only works with IPv4.  In contrast
to IPv4, IPv6 raw sockets do not provide access to the
raw IP packet.  Thus the method used to access the TOS
byte value of an IPv4 packet does not work for the TC byte
value of an IPv6 packet.  This results in always generating
'(TOS unknown)' for IPv6 targets.

5 months agotest --print-tos without -O
Erik Auerswald [Sun, 28 Jul 2024 17:41:43 +0000 (19:41 +0200)]
test --print-tos without -O

Printing the TOS byte of the received Echo response does not
require setting a non-default TOS byte value in the Echo request.

5 months agotest --print-tos without raw socket
Erik Auerswald [Sun, 28 Jul 2024 17:35:46 +0000 (19:35 +0200)]
test --print-tos without raw socket

The current code can only read the TOS byte when using a raw
socket.  It prints '(TOS unknown)' when a datagram socket is
used.

5 months agotest-11-unpriv.pl: always use /tmp/fping.copy
Erik Auerswald [Sun, 28 Jul 2024 17:28:01 +0000 (19:28 +0200)]
test-11-unpriv.pl: always use /tmp/fping.copy

5 months agoDocument that -a and -u are overridden by -c and -C
Erik Auerswald [Sun, 28 Jul 2024 16:04:18 +0000 (18:04 +0200)]
Document that -a and -u are overridden by -c and -C

The other way around was already documented in commit
ae0bc2380462878466f19aa45c7d38774f4b6e3f, but GitHub
pull request #337 by Moritz Lenz implies that this is
insufficient.

5 months agoPrint returned TOS value
German Service Network [Sat, 27 Jul 2024 17:36:16 +0000 (19:36 +0200)]
Print returned TOS value

5 months agonew option --check-source
Erik Auerswald [Fri, 12 Jul 2024 18:34:57 +0000 (20:34 +0200)]
new option --check-source

Using the new option --check-source discards Echo reply packets
sourced from an address that is different from the specified target
address.  This can be useful on busy monitoring hosts, because it
is possible that two fping processes running at he same time use
the same ICMP Echo Reply Identifier for ICMP Echo messages sent to
different hosts.

This aims to address GH issue #206.

6 months agoSets SEQMAP_TIMEOUT_IN_NSSEQMAP_TIMEOUT_IN_NS as INT64_C
German Service Network [Sat, 20 Jul 2024 19:06:40 +0000 (21:06 +0200)]
Sets SEQMAP_TIMEOUT_IN_NSSEQMAP_TIMEOUT_IN_NS as INT64_C

6 months agoadjust generator limit to allow an IPv4 /15
Erik Auerswald [Sun, 7 Jul 2024 15:36:04 +0000 (17:36 +0200)]
adjust generator limit to allow an IPv4 /15

6 months agofix off-by-one error in generator limit
Erik Auerswald [Sun, 7 Jul 2024 14:30:23 +0000 (16:30 +0200)]
fix off-by-one error in generator limit

This commit does not add tests that verify the exact limit,
because pinging 100000 localhost addresses takes over 15
minutes on my PC.  I have tested this fix manually.

6 months agoalso apply generator limit to use with CIDR
Erik Auerswald [Sun, 7 Jul 2024 13:41:35 +0000 (15:41 +0200)]
also apply generator limit to use with CIDR

As described in GH issue #299, the MAX_GENERATE+1 limit is only
applied when using an address range, not when using CIDR.  This
commit changes this to always honor the generator limit.

* refactor target address generation to use the same new function
  for both range and CIDR notation
* check the limit for addresses to generate in the new function
* document the generator limit in "fping --help" output
* document the generator limit in the fping man page
* test that the address generation limit applies when using CIDR
  notation

6 months agoalign functions add_cidr() and add_range()
Erik Auerswald [Sun, 7 Jul 2024 12:09:07 +0000 (14:09 +0200)]
align functions add_cidr() and add_range()

* call freeaddrinfo() before checking the prefix length in
  add_cidr()
* add a comment to the generator limit check in add_range()

6 months agoci: skip an unreliable test on macOS
Erik Auerswald [Sun, 23 Jun 2024 16:57:18 +0000 (18:57 +0200)]
ci: skip an unreliable test on macOS

Sometimes, this test fails on macOS, at least on the GitHub CI.
It looks as if the fping process is killed before it produces
the required output.  This test works reliably on GNU/Linux, so
keep it, but skip it when running on macOS.

6 months agoci: test timestamp plausibility
Erik Auerswald [Sun, 23 Jun 2024 15:19:13 +0000 (17:19 +0200)]
ci: test timestamp plausibility

Some changes of fping resulted in some systems reporting
implausible timestamps, see, e.g., GH issue #203.  This
commit adds a simplistic plausability check for timestamps
in Unix time format: they need to be greater or equal to
1000000000 (2001-09-09 03:46:40+02:00).

6 months agoci: test empty string argument instead of number
Erik Auerswald [Sun, 23 Jun 2024 15:04:48 +0000 (17:04 +0200)]
ci: test empty string argument instead of number

Giving an empty string instead of a number as option argument
was not reliably caught, see GH issue #324 and GH PR #323.

7 months agoFix incorrect return-value check for a scanf like function
German Service Network [Sat, 8 Jun 2024 18:42:13 +0000 (20:42 +0200)]
Fix incorrect return-value check for a scanf like function

7 months agoconfigure.ac check required function strftime
German Service Network [Mon, 10 Jun 2024 08:18:06 +0000 (10:18 +0200)]
configure.ac check required function strftime

7 months agoExtended dokumentation for parameter timestamp-format
German Service Network [Mon, 10 Jun 2024 06:20:39 +0000 (08:20 +0200)]
Extended dokumentation for parameter timestamp-format

7 months agoTest 05 for --timestamp-format extended
German Service Network [Mon, 10 Jun 2024 06:17:56 +0000 (08:17 +0200)]
Test 05 for --timestamp-format extended

7 months agoNew parameter timestamp-format for changing the timestamp output
German Service Network [Mon, 10 Jun 2024 06:17:45 +0000 (08:17 +0200)]
New parameter timestamp-format for changing the timestamp output

7 months agoHandling optparse long option
German Service Network [Sun, 19 May 2024 19:22:03 +0000 (21:22 +0200)]
Handling optparse long option

7 months agoChange to codeql-action-v2
German Service Network [Sun, 19 May 2024 07:34:28 +0000 (09:34 +0200)]
Change to codeql-action-v2

7 months agoDebug with Visual Studio Code
German Service Network [Sun, 19 May 2024 17:45:13 +0000 (19:45 +0200)]
Debug with Visual Studio Code

7 months agotest error when binding to wrong local address
Erik Auerswald [Sun, 19 May 2024 15:54:37 +0000 (17:54 +0200)]
test error when binding to wrong local address

Test "fping -S" with both IPv4 and IPv6 addresses not configured
on local interfaces using addresses reserved for documentation.
Check the fping error message, but accept any system generated
additional information.  This additional information differs
between operation systems.

7 months agotest help output during normal option parsing
Erik Auerswald [Sun, 19 May 2024 15:42:31 +0000 (17:42 +0200)]
test help output during normal option parsing

The existing test for "fping -h" triggers the special code path
for only one option, either -h or --help, that is handled before
normal option parsing.

8 months agoPrint cumulative stats with -Q SECS,cumulative
Erik Auerswald [Tue, 30 Apr 2024 15:55:30 +0000 (17:55 +0200)]
Print cumulative stats with -Q SECS,cumulative

With -Q SECS, fping emits information for the just finished
interval.  This is good for long-running fping processes where
one would like to get an update on recent results, ignoring
missing responses from older intervals.  This seems appropriate
for use with other software like netdata or smokeping.

But for short(er)-running fping processes, e.g., during a change
window, it may be more interesting to get a status update since
the beginning of the change window, i.e., the start of fping.
Adding a comma followed by the keyword "cumulative" to -Q SECS
(i.e., -Q SECS,cumulative) changes the interim reports to output
the current per system overall statistics, unless -N is used, too.

The new syntax is documented in fping.pod and added to fping -h
output.

Four tests are added:

  1. Characters after SECS are ignored as before.
  2. Unknown keywords are ignored as before.
  2. Adding ",cumulative" changes -Q output.
  3. Adding ",cumulative" also affects the additional -o output.

This addresses issue #243.

9 months agoPrepare v5.2 release.
dwes [Sat, 20 Apr 2024 09:00:06 +0000 (11:00 +0200)]
Prepare v5.2 release.

9 months agoRemoves the unnecessary file 18
German Service Network [Sun, 14 Apr 2024 10:17:48 +0000 (12:17 +0200)]
Removes the unnecessary file 18

9 months agoExtended configure.ac with --enable-debug and create debug output cpu time use
German Service Network [Sun, 17 Mar 2024 07:10:20 +0000 (08:10 +0100)]
Extended configure.ac with --enable-debug and create debug output cpu time use

9 months agoUpdate Azure Pipline add macOS pipline job
German Service Network [Wed, 20 Mar 2024 08:37:30 +0000 (09:37 +0100)]
Update Azure Pipline add macOS pipline job

9 months agoUpdate Azure Pipline linux test based on github pipline with matching exclude
German Service Network [Wed, 20 Mar 2024 08:10:51 +0000 (09:10 +0100)]
Update Azure Pipline linux test based on github pipline with matching exclude

9 months agoFix number of tests
David Schweikert [Sat, 13 Apr 2024 15:53:04 +0000 (17:53 +0200)]
Fix number of tests

9 months agoRemove flaky test for now.
David Schweikert [Thu, 4 Apr 2024 14:39:55 +0000 (16:39 +0200)]
Remove flaky test for now.

Remove the 'fping -X 2 --generate 8.8.0.0/29' test, because it
is currently failing on the MacOS runner. Also, I am not sure that
it is a good idea to ping the IPs 8.8.0.1 and 8.8.0.2 and rely on
them being up.

9 months agoCheck if the variable next_value->ping_ts != 0 in seqmap_add()
German Service Network [Wed, 20 Mar 2024 06:31:37 +0000 (07:31 +0100)]
Check if the variable next_value->ping_ts != 0 in seqmap_add()

10 months agoalways output error message in crash_and_burn()
Erik Auerswald [Wed, 21 Feb 2024 19:27:37 +0000 (20:27 +0100)]
always output error message in crash_and_burn()

This aligns crash_and_burn() with errno_crash_and_burn()
and addresses issue #300.

10 months agoimprove help output for options -c and -C
Erik Auerswald [Wed, 21 Feb 2024 19:22:44 +0000 (20:22 +0100)]
improve help output for options -c and -C

11 months agouse function stats_reset_interval()
Erik Auerswald [Sat, 17 Feb 2024 16:34:57 +0000 (17:34 +0100)]
use function stats_reset_interval()

Git commit bb8d71ef27f673f25c7e1648ea982c27bb61ac0d from 2020 among many
other things introduced the function stats_reset_interval() to reset the
*_i interval (or split) host statistics, but did not use it.  This commit
replaces the open coded reset of interval stats inside print_host_splits()
and print_netdata() with calling stats_reset_interval().

11 months agotypo fixes pertaining to ICMP for IPv6 sockets
Erik Auerswald [Sat, 17 Feb 2024 16:21:32 +0000 (17:21 +0100)]
typo fixes pertaining to ICMP for IPv6 sockets

As mentioned in issue #300, error messages pertaining to
socket creation may not be printed.  But they should be
corrected anyway, just as the comments.  Having correct
error messages also makes a fix for issue #300 more
obvious, because the messages itself would not change.

11 months agoDocument that -c N overrides -a or -u
Erik Auerswald [Wed, 7 Feb 2024 18:38:51 +0000 (19:38 +0100)]
Document that -c N overrides -a or -u

11 months agoDecouple -a/-u effects from -c
Erik Auerswald [Wed, 7 Feb 2024 18:36:48 +0000 (19:36 +0100)]
Decouple -a/-u effects from -c

As described in issue #295, the option combinations "-c N -u"
and "-c N -a" inadvertently have the same effect as "-c N -q".
Prevent this by first acting on -c, which includes disabling
either -a or -u, if -c is given, before acting on -a/-u.

11 months agoMove description of -i MSEC to probing options
Erik Auerswald [Wed, 7 Feb 2024 18:31:42 +0000 (19:31 +0100)]
Move description of -i MSEC to probing options

The -i MSEC, --interval=MSEC option does not directly affect
the output format, but rather the probe generation, i.e., the
minimum time between probes.  Thus it is more fitting to list
it under "probing options" than under "output options".

11 months agoTest ping to "all IPv6 nodes" multicast address
Erik Auerswald [Tue, 6 Feb 2024 20:55:09 +0000 (21:55 +0100)]
Test ping to "all IPv6 nodes" multicast address

Any Echo Response packet uses a different source address than
used for the target, because it is not allowed to use a multicast
address as source.  This results in extra output in a specific
format on standard error.

This should work, because IPv6 requires multicast support, and
every IPv6 node is supposed to join the "all nodes" multicast
group, including the node the test runs on.  It at least works
on my Ubuntu 20.04 LTS system.

11 months agoTest edge cases of -f and -g
Erik Auerswald [Tue, 6 Feb 2024 20:52:31 +0000 (21:52 +0100)]
Test edge cases of -f and -g

* -f with non-existing file
* -f with input file containing comment and empty line
* -g with non-numeric address in "CIDR" format
* -g with one non-numeric address in start resp. end position
* -g with one IPv6 address in start resp. end position

11 months agoTest -l together with -Q or -t
Erik Auerswald [Tue, 6 Feb 2024 20:45:27 +0000 (21:45 +0100)]
Test -l together with -Q or -t

11 months agoTest that -x, -X, -k require numeric argument
Erik Auerswald [Tue, 6 Feb 2024 20:43:56 +0000 (21:43 +0100)]
Test that -x, -X, -k require numeric argument

11 months agoTest that negative numbers are not accepted
Erik Auerswald [Tue, 6 Feb 2024 20:42:55 +0000 (21:42 +0100)]
Test that negative numbers are not accepted

11 months agoFix a comment describing a test
Erik Auerswald [Tue, 6 Feb 2024 19:20:23 +0000 (20:20 +0100)]
Fix a comment describing a test

11 months agoDefensive coding: guard against a division by zero
Erik Auerswald [Tue, 9 Jan 2024 11:40:46 +0000 (12:40 +0100)]
Defensive coding: guard against a division by zero

In the function print_per_system_stats(), if packets have been
lost, the number of sent packets is checked to be positive before
dividing by it.  If no packets have been lost, this is not checked.
Either the existing check is not needed, or both code paths need
the check.

The function print_per_system_splits() is quite similar to
print_per_system_stats(), and has the equivalent guards against a
division by zero in both code paths, not just one of them.

In the spirit of defensive coding, I think it is better to be safe
and add the missing guard against a division by zero.

11 months agoUpdate exit status description in man page
Erik Auerswald [Wed, 10 Jan 2024 09:47:12 +0000 (10:47 +0100)]
Update exit status description in man page

With the options -x and -X, fping does not require all hosts to
be reachable for an exit status of 0.

This addresses a comment in issue #99 suggesting such a man page
update.

12 months agoTest examples from man page
Erik Auerswald [Mon, 8 Jan 2024 08:35:49 +0000 (09:35 +0100)]
Test examples from man page

The man page gives two examples combining -C and -q, but
these combinations are not yet tested.  Add tests to help
ensure the documented examples continue to work.

12 months agoAdd test for option combination -Q SECS -o
Erik Auerswald [Mon, 8 Jan 2024 08:16:29 +0000 (09:16 +0100)]
Add test for option combination -Q SECS -o

The -o option adds outage duration to the periodic reports.
Each report shows the outage since the last report, not since
the beginning.

12 months agoAdd longer test for -Q SECS
Erik Auerswald [Mon, 8 Jan 2024 08:15:04 +0000 (09:15 +0100)]
Add longer test for -Q SECS

The statistics printed every SECS seconds show the results
since the the last report, not since the beginning.  Also,
every report starts with a timestamp.

12 months agoTest that -g does not accept IPv6
Erik Auerswald [Mon, 8 Jan 2024 08:12:59 +0000 (09:12 +0100)]
Test that -g does not accept IPv6

12 months agoTest edge case behavior of "fping -g"
Erik Auerswald [Mon, 8 Jan 2024 08:12:09 +0000 (09:12 +0100)]
Test edge case behavior of "fping -g"

* wrong number or kind of arguments fails and prints usage;
* an empty range silently pings nothing and fping returns 1;
* a too large range fails with an error message;
* a zero CIDR prefix length fails with an error message.

12 months agoAdd --fwmark/-k option for Linux
deepkv [Fri, 15 Dec 2023 16:25:00 +0000 (17:25 +0100)]
Add --fwmark/-k option for Linux

14 months agoChange obsolete macro from AC_CANONICAL_SYSTEM to AC_CANONICAL_TARGET
German Service Network [Fri, 15 Sep 2023 19:20:14 +0000 (21:20 +0200)]
Change obsolete macro from AC_CANONICAL_SYSTEM to AC_CANONICAL_TARGET

14 months agoMove the OS detection to configure.ac script to set the use of clock_realtime
German Service Network [Sun, 10 Sep 2023 08:33:33 +0000 (10:33 +0200)]
Move the OS detection to configure.ac script to set the use of clock_realtime

14 months agoFix deprected github action ubuntu-18.04 to ubuntu-22.04
German Service Network [Fri, 15 Sep 2023 19:41:42 +0000 (21:41 +0200)]
Fix deprected github action ubuntu-18.04 to ubuntu-22.04

14 months agoChecking obsolete macro AC_PROG_CC_STDC as of autoconf-2.70
German Service Network [Wed, 1 Nov 2023 07:39:57 +0000 (08:39 +0100)]
Checking obsolete macro AC_PROG_CC_STDC as of autoconf-2.70

14 months agoChecking obsolete macro AC_GNU_SOURCE as of autoconf-2.62
German Service Network [Sat, 30 Sep 2023 19:12:59 +0000 (21:12 +0200)]
Checking obsolete macro AC_GNU_SOURCE as of autoconf-2.62

16 months agoRemove dockerfile from root
darless [Thu, 31 Aug 2023 15:28:21 +0000 (10:28 -0500)]
Remove dockerfile from root

16 months agoMove to contrib folder
darless1 [Tue, 6 Dec 2022 19:03:16 +0000 (13:03 -0600)]
Move to contrib folder

16 months agoDockerfile for fping
darless1 [Tue, 6 Dec 2022 18:52:41 +0000 (12:52 -0600)]
Dockerfile for fping

16 months agoRepair the faulty test 15
German Service Network [Sun, 3 Sep 2023 07:30:06 +0000 (09:30 +0200)]
Repair the faulty test 15