]> git.gsnw.org Git - fping.git/log
fping.git
29 hours agoConsistent variable names for command-line options develop
German Service Network [Mon, 12 Jan 2026 14:04:53 +0000 (15:04 +0100)]
Consistent variable names for command-line options

29 hours agoci: coverity scan check COVERITY_SCAN_TOKEN
German Service Network [Mon, 12 Jan 2026 12:38:20 +0000 (13:38 +0100)]
ci: coverity scan check COVERITY_SCAN_TOKEN

2 days agowork around NetBSD's lack of IP_RECVTOS
Erik Auerswald [Wed, 7 Jan 2026 00:04:13 +0000 (01:04 +0100)]
work around NetBSD's lack of IP_RECVTOS

NetBSD does not know the IP_RECVTOS socket option.  Thus
conditionally compile setting this option only when it is
defined.

This is the same change as used in the NetBSD package[1],
with thanks to "adam".

[1] https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/fping/patches/patch-src_fping.c?rev=1.5;content-type=text%2Fplain

2 days agoconfigure.ac: improve portability
Erik Auerswald [Tue, 6 Jan 2026 23:47:32 +0000 (00:47 +0100)]
configure.ac: improve portability

Testing string equality using "test" is done with the "="
operator.  Bash also accepts "==", but this is not portable.
The issue was noticed on NetBSD, which uses a patch to the
generated "configure" script[1].

[1] https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/fping/patches/patch-configure?rev=1.3;content-type=text%2Fplain

9 days agoPerformance: use MSG_DONTWAIT instead of select.
David Schweikert [Fri, 2 Jan 2026 07:49:06 +0000 (08:49 +0100)]
Performance: use MSG_DONTWAIT instead of select.

This also improves a bit the conversion from nanoseconds to
seconds + microseconds.

11 days agoci: Removing travis-ci
German Service Network [Thu, 1 Jan 2026 09:43:03 +0000 (10:43 +0100)]
ci: Removing travis-ci

11 days agoImplement coverity scan with GitHub Action
David Schweikert [Fri, 2 Jan 2026 07:24:37 +0000 (08:24 +0100)]
Implement coverity scan with GitHub Action

12 days agoInclude JSON schema in release tarball
Jan Palus [Thu, 1 Jan 2026 15:17:17 +0000 (16:17 +0100)]
Include JSON schema in release tarball

13 days agoRelease v5.5 v5.5
David Schweikert [Wed, 31 Dec 2025 16:19:30 +0000 (17:19 +0100)]
Release v5.5

2 weeks agoFix usage pod2man under FreeBSD and OpenBSD
German Service Network [Sun, 28 Dec 2025 14:55:03 +0000 (15:55 +0100)]
Fix usage pod2man under FreeBSD and OpenBSD

2 weeks agoRelease 5.5-rc2
David Schweikert [Sun, 28 Dec 2025 08:05:21 +0000 (09:05 +0100)]
Release 5.5-rc2

2 weeks agoReject negative numbers for options requiring positive arguments
David Schweikert [Sat, 27 Dec 2025 09:12:46 +0000 (10:12 +0100)]
Reject negative numbers for options requiring positive arguments

2 weeks agoReplace sscanf with strtoul/strtod for stricter option parsing
David Schweikert [Wed, 24 Dec 2025 06:41:48 +0000 (07:41 +0100)]
Replace sscanf with strtoul/strtod for stricter option parsing

2 weeks agoReplace atoi/atof with stroul/strtod
David Schweikert [Wed, 24 Dec 2025 06:17:35 +0000 (07:17 +0100)]
Replace atoi/atof with stroul/strtod

This improves validation of the flag values (so that for example
-c 3foobar is not accepted anymore).

2 weeks agoci/prepare-linux.sh: do not run setcap unless necessary
David Schweikert [Sat, 27 Dec 2025 07:42:16 +0000 (08:42 +0100)]
ci/prepare-linux.sh: do not run setcap unless necessary

2 weeks agoSmall code coverage improvements
David Schweikert [Wed, 24 Dec 2025 07:06:32 +0000 (08:06 +0100)]
Small code coverage improvements

2 weeks agoAdd .local to .gitignore.
David Schweikert [Fri, 26 Dec 2025 09:04:05 +0000 (10:04 +0100)]
Add .local to .gitignore.

Make it easier add files that are ignored when working with git or jj.

2 weeks agoJSON: rename globalSum to "stats" and avoid spaces in key names.
David Schweikert [Mon, 22 Dec 2025 14:42:11 +0000 (15:42 +0100)]
JSON: rename globalSum to "stats" and avoid spaces in key names.

2 weeks agoImplement GPG verification of autotools tarballs
David Schweikert [Thu, 25 Dec 2025 10:50:37 +0000 (11:50 +0100)]
Implement GPG verification of autotools tarballs

2 weeks agoImprove robustness of downloading of autotools tarballs.
David Schweikert [Thu, 25 Dec 2025 08:55:37 +0000 (09:55 +0100)]
Improve robustness of downloading of autotools tarballs.

2 weeks agoGitHub actions: don't run tests twice for github PRs
David Schweikert [Thu, 25 Dec 2025 09:23:50 +0000 (10:23 +0100)]
GitHub actions: don't run tests twice for github PRs

2 weeks agoUpdate autotools.
David Schweikert [Thu, 25 Dec 2025 21:41:38 +0000 (22:41 +0100)]
Update autotools.

2 weeks agoUse SIGINT to kill fping so that coverage data is collected.
David Schweikert [Wed, 24 Dec 2025 07:06:32 +0000 (08:06 +0100)]
Use SIGINT to kill fping so that coverage data is collected.

2 weeks agoTests performance and robustness fixes.
David Schweikert [Mon, 22 Dec 2025 15:15:55 +0000 (16:15 +0100)]
Tests performance and robustness fixes.

2 weeks agoci: improve autotools build reliability with ftpmirror and retries
David Schweikert [Wed, 24 Dec 2025 09:11:54 +0000 (10:11 +0100)]
ci: improve autotools build reliability with ftpmirror and retries

3 weeks agoFix measurement of time for timed reports (-Q) to start after DNS name resolution.
David Schweikert [Mon, 22 Dec 2025 21:33:53 +0000 (22:33 +0100)]
Fix measurement of time for timed reports (-Q) to start after DNS name resolution.

3 weeks agoPrepare v5.5-rc1 release
David Schweikert [Sun, 21 Dec 2025 17:12:28 +0000 (18:12 +0100)]
Prepare v5.5-rc1 release

3 weeks agoFix GitHub markdown alert format
David Schweikert [Sat, 20 Dec 2025 08:51:00 +0000 (09:51 +0100)]
Fix GitHub markdown alert format

3 weeks agoJSON documentation: reformat
David Schweikert [Thu, 18 Dec 2025 17:04:37 +0000 (18:04 +0100)]
JSON documentation: reformat

3 weeks agoci: Github action Build and Push Docker Image rollback sigstore osign-installer version
German Service Network [Fri, 19 Dec 2025 07:42:08 +0000 (08:42 +0100)]
ci: Github action Build and Push Docker Image rollback sigstore osign-installer version

3 weeks agoci: Update github action version
German Service Network [Sat, 13 Dec 2025 15:49:11 +0000 (16:49 +0100)]
ci: Update github action version

3 weeks agoci: Fix test unkown host
German Service Network [Thu, 18 Dec 2025 09:01:22 +0000 (10:01 +0100)]
ci: Fix test unkown host

4 weeks agoJSON format documentation
David Schweikert [Sun, 7 Dec 2025 12:47:37 +0000 (13:47 +0100)]
JSON format documentation

4 weeks agojson: simplify recv and timeout output (and code)
David Schweikert [Sun, 7 Dec 2025 18:53:55 +0000 (19:53 +0100)]
json: simplify recv and timeout output (and code)

5 weeks agoAllow --json also for loop-mode
David Schweikert [Sun, 7 Dec 2025 13:11:22 +0000 (14:11 +0100)]
Allow --json also for loop-mode

2 months agoci: Fix spelling mistake in GitHub action Build and Push Docker Image
German Service Network [Fri, 31 Oct 2025 05:25:02 +0000 (06:25 +0100)]
ci: Fix spelling mistake in GitHub action Build and Push Docker Image

2 months agoci: Start the GitHub action Build and Push Docker Image only when pushing to develop...
German Service Network [Thu, 23 Oct 2025 05:52:05 +0000 (07:52 +0200)]
ci: Start the GitHub action Build and Push Docker Image only when pushing to develop branch

2 months agoRemove double quote from URL Coverity Scan badge
Sebastian [Thu, 2 Oct 2025 14:25:43 +0000 (16:25 +0200)]
Remove double quote from URL Coverity Scan badge

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2 months agoChange status image from Travis to Github Action
German Service Network [Sun, 28 Sep 2025 07:59:12 +0000 (09:59 +0200)]
Change status image from Travis to Github Action

4 months agoci: Github action Build and Push Docker Image
German Service Network [Tue, 9 Sep 2025 09:54:33 +0000 (11:54 +0200)]
ci: Github action Build and Push Docker Image

4 months agoimprove limits documentation in man page
Erik Auerswald [Sat, 30 Aug 2025 14:31:32 +0000 (16:31 +0200)]
improve limits documentation in man page

* Mention --enable-safe-limits in -i and -p descriptions
* Mention new unconditional limit for -p in option description
* Mention new unconditional limit for -p in limits section
* More consistent formatting in limits section by using B<>
  for the generator options

4 months agoadjust current CHANGELOG.md entries
Erik Auerswald [Sat, 2 Aug 2025 12:29:24 +0000 (14:29 +0200)]
adjust current CHANGELOG.md entries

* add thanks to @hoodadt for the merged pull request
* adjust line lengths using `fmt -c`

4 months agoinitialize all resp_times array entries
Erik Auerswald [Sun, 24 Aug 2025 12:44:08 +0000 (14:44 +0200)]
initialize all resp_times array entries

Before, the resp_times array was initialized starting with the
second entry, leaving the first entry uninitialized.  This is
at least confusing.  Initializing one additional int64_t value
per ping target should not add too much overhead, so do this just
to be on the safe side.

Assuming that the first array entry need not be initialized when
creating the array now, this guards against potential problems
from future code changes that do not take this unexpected special
case into account.

4 months agoPrint receive ping moved to new functions
German Service Network [Sat, 23 Aug 2025 08:50:45 +0000 (10:50 +0200)]
Print receive ping moved to new functions

4 months agoprevent allocation size computation overflow
Erik Auerswald [Sat, 23 Aug 2025 12:52:08 +0000 (14:52 +0200)]
prevent allocation size computation overflow

On systems where size_t is unsigned int, computing the size
of the resp_times array can overflow.  Add a check to prevent
this.

On a 64-bit x86_64 Ubuntu 22.04.5 LTS system, the overflow check
results in a compiler warning:

```
fping.c: In function ‘add_addr’:
fping.c:3444:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
 3444 |         if (trials > (SIZE_MAX / sizeof(int64_t)))
      |                    ^
```

Thus limit the check to systems with a size_t equal to (or less
than) unsigned int.

4 months agoFix missing escape character in JSON output test
German Service Network [Wed, 20 Aug 2025 11:04:46 +0000 (13:04 +0200)]
Fix missing escape character in JSON output test

4 months agoFix the missing new line character on JSON output for an invalid host warning
German Service Network [Wed, 20 Aug 2025 10:59:14 +0000 (12:59 +0200)]
Fix the missing new line character on JSON output for an invalid host warning

4 months agoFix changelog entry for the new -p lower limit
David Schweikert [Tue, 19 Aug 2025 08:05:27 +0000 (10:05 +0200)]
Fix changelog entry for the new -p lower limit

4 months agoUpdate changelog
David Schweikert [Sun, 17 Aug 2025 21:22:39 +0000 (23:22 +0200)]
Update changelog

4 months agoSafe memory allocation for event storage.
David Schweikert [Sun, 17 Aug 2025 20:42:45 +0000 (22:42 +0200)]
Safe memory allocation for event storage.

- Check calloc return value.
- Make sure that the per-host interval can't be unreasonably low (making the event storage allocation very large).

The issue was reported by David.A.

4 months agoFix off-by-one boundary check in seqmap code
David Schweikert [Sun, 17 Aug 2025 20:48:25 +0000 (22:48 +0200)]
Fix off-by-one boundary check in seqmap code

4 months agoRemove macos-specific test to verify that -I is not supported, since that seems to...
David Schweikert [Tue, 19 Aug 2025 07:11:01 +0000 (09:11 +0200)]
Remove macos-specific test to verify that -I is not supported, since that seems to work now.

Failed test:

```
#   Failed test 'exit_is_num: fping -I lo0 127.0.0.1, 3'
#   at ci/test-07-options-i-m.pl line 63.
#          got: 0
#     expected: 3

#   Failed test 'stdout_is_eq: fping -I lo0 127.0.0.1, fping: cant bind to a particular net interface since SO_BINDTODEVICE is not supported on your os.
# '
#   at ci/test-07-options-i-m.pl line 64.
#          got: '127.0.0.1 is alive
# '
#     expected: 'fping: cant bind to a particular net interface since SO_BINDTODEVICE is not supported on your os.
# '
# Looks like you failed 2 tests of 28.
```

4 months agoUpdate .gitignore
David Schweikert [Sat, 9 Aug 2025 16:22:56 +0000 (18:22 +0200)]
Update .gitignore

5 months agoUpdate Dockerfile
hoodad [Sun, 27 Jul 2025 14:43:01 +0000 (14:43 +0000)]
Update Dockerfile

5 months agoMore Labels
hoodad [Thu, 24 Jul 2025 11:36:38 +0000 (11:36 +0000)]
More Labels

5 months agoFixed Dockerfile Typo
hoodad [Thu, 24 Jul 2025 10:42:48 +0000 (10:42 +0000)]
Fixed Dockerfile Typo

5 months agoUpdate CHANGELOG.md
hoodad [Thu, 24 Jul 2025 10:40:20 +0000 (10:40 +0000)]
Update CHANGELOG.md

5 months agoUpdate Dockerfile
hoodadt [Mon, 21 Jul 2025 11:41:17 +0000 (15:11 +0330)]
Update Dockerfile

5 months agoBetter Dockerfile
hoodad [Mon, 21 Jul 2025 11:54:53 +0000 (11:54 +0000)]
Better Dockerfile

5 months agoBetter Dockerfile
hoodad [Mon, 21 Jul 2025 11:46:29 +0000 (11:46 +0000)]
Better Dockerfile

5 months agosuppress duplicate reports with -c/-C and -q/-Q
Erik Auerswald [Sun, 4 May 2025 16:09:48 +0000 (18:09 +0200)]
suppress duplicate reports with -c/-C and -q/-Q

If fping receives a duplicate Echo Reply packet, it reports
this.  This report was suppressed for loop mode, and for
other operating modes where each receive event is reported.
Now, this duplicate report is also suppressed when in count
mode with options -q, --quiet or -Q, --squiet.

This addresses GitHub issue #389.

6 months agofix ICMPv6 error message handling and reporting
Erik Auerswald [Sun, 4 May 2025 15:44:29 +0000 (17:44 +0200)]
fix ICMPv6 error message handling and reporting

Handling of received ICMPv6 messages different from Echo Reply
was based on IPv4 code.  It would thus use a too small minimum
size, and interpret the wrong data as ICMPv6 fields.  Thus
received ICMPv6 error messages were either not reported at all,
or were reported incorrectly.

This commit introduces the following changes to fix this and thus
address GitHub issue #390:

- Filter out irrelevant ICMPv6 messages: fping needs to receive
  ICMPv6 Echo Reply and ICMPv6 error messages, nothing else
  (only relevant for raw sockets).
- Fix offset calculation to look at the included packet that
  caused this ICMPv6 error message.
- Ignore invoking packets that do not have ICMPv6 as the first
  IPv6 Next Header in the packet (there could be, e.g., IPv6
  Extension Headers).
- Fix ICMPv6 message type determination, and print respective
  warning messages.

6 months agoEntry for JSON output in the changelog
German Service Network [Sun, 25 May 2025 07:03:44 +0000 (09:03 +0200)]
Entry for JSON output in the changelog

6 months agoChange of the JSON return text if -c or -C was not specified
German Service Network [Wed, 30 Apr 2025 19:56:03 +0000 (21:56 +0200)]
Change of the JSON return text if -c or -C was not specified

6 months agooptparse_long for json changed to OPTPARSE_NONE
German Service Network [Wed, 30 Apr 2025 17:28:42 +0000 (19:28 +0200)]
optparse_long for json changed to OPTPARSE_NONE

6 months agoAdd JSON support for --timestamp-format
German Service Network [Wed, 30 Apr 2025 17:19:25 +0000 (19:19 +0200)]
Add JSON support for --timestamp-format

6 months agoFix JSON output print_per_system_stats_json dash to null
German Service Network [Wed, 30 Apr 2025 16:39:15 +0000 (18:39 +0200)]
Fix JSON output print_per_system_stats_json dash to null

6 months agoAdd JSON timeout event type
German Service Network [Sat, 26 Apr 2025 17:39:30 +0000 (19:39 +0200)]
Add JSON timeout event type

6 months agoFormat change for handle JSON output for invalid hosts
German Service Network [Sat, 26 Apr 2025 09:45:02 +0000 (11:45 +0200)]
Format change for handle JSON output for invalid hosts

6 months agoNew option -J / --json for the JSON output
German Service Network [Sun, 20 Apr 2025 17:34:21 +0000 (19:34 +0200)]
New option -J / --json for the JSON output

6 months agoci: Fix forgotten github action codeql init v3
German Service Network [Tue, 8 Jul 2025 05:03:43 +0000 (07:03 +0200)]
ci: Fix forgotten github action codeql init v3

6 months agoci: Change codeql deprected action v2 to v3
German Service Network [Fri, 27 Jun 2025 14:43:05 +0000 (16:43 +0200)]
ci: Change codeql deprected action v2 to v3

6 months agonew option --seqmap-timeout=MSEC
Erik Auerswald [Mon, 21 Apr 2025 18:02:17 +0000 (20:02 +0200)]
new option --seqmap-timeout=MSEC

This allows to control the time after which sequence numbers
can be reused for new probe packets.  This is intended to
help using count or loop modes with tens of thousands of
target hosts.

See GH issue #385 for more information.

7 months agoprint TOS & TTL also for IPv6 and w/o privileges
Erik Auerswald [Sun, 9 Mar 2025 19:28:42 +0000 (20:28 +0100)]
print TOS & TTL also for IPv6 and w/o privileges

When using IPv4 raw sockets, fping has access to the received
IP packet data including the IP header.  This allows to simply
read the TOS byte and/or TTL value from the IP header.

But, using IPv4 raw sockets requires privileges.  Additionally,
IPv6 raw sockets do not provide access to the IPv6 header.

For IPv6, or when using IPv4 datagram sockets, i.e., when fping
runs without privileges, a different method needs to be used to
access TOS / TC and TTL / Hop Count of received packets.  The
so called "control messages", also called "ancillary data", can
be used for this.  This requires several actions:

* set the respective socket options to request additional data,
* ensure the buffer used to receive additional data is sized
  large enough,
* read and process the requested additional data.

7 months agoFix: OpenBSD sprintf warning
German Service Network [Sat, 17 May 2025 19:33:19 +0000 (21:33 +0200)]
Fix: OpenBSD sprintf warning

7 months agofix build without IPv6 support
Erik Auerswald [Sun, 11 May 2025 17:11:14 +0000 (19:11 +0200)]
fix build without IPv6 support

In commit 57d91b13f20529a23df8c29eaf612d8483e318d8, I missed
one set of "#ifdev IPV6 ... #endif" guards for a piece of code
only relevant for IPv6 support in the generator.  This broke
the build with --disable-ipv6, or without IPv6 support on the
build system.

7 months agorestore inadvertantly removed IPv4 test for -k
Erik Auerswald [Sat, 26 Apr 2025 16:19:13 +0000 (18:19 +0200)]
restore inadvertantly removed IPv4 test for -k

This was removed in an commit by me that should only have added
a new test (commit 4160d03a2653684b37a776744095aac43f7efc88).

8 months agoci: Change github action unsupported ubuntu-20.04
German Service Network [Fri, 18 Apr 2025 07:22:09 +0000 (09:22 +0200)]
ci: Change github action unsupported ubuntu-20.04

9 months agofix debug build use of dbg_printf in fping.c
Erik Auerswald [Sat, 8 Mar 2025 19:02:53 +0000 (20:02 +0100)]
fix debug build use of dbg_printf in fping.c

config.h must be include before fping.h, because
configure --enable-debug writes the DEBUG #define
to config.h, and the dbg_printf macro definition
requires a defined DEBUG to actually produce any
output.

Unbreaking dbg_printf() exposed an instance of
wrong use, so fix that.  Also, add a newline to
the debug output reporting used CPU time.

9 months agotest that --icmp-timestamp requires privileges
Erik Auerswald [Sat, 8 Mar 2025 18:45:14 +0000 (19:45 +0100)]
test that --icmp-timestamp requires privileges

9 months agofix typo in S_BINDTODEVICE error message
Erik Auerswald [Sat, 8 Mar 2025 18:30:48 +0000 (19:30 +0100)]
fix typo in S_BINDTODEVICE error message

Also, add tests with -I.  In the currently use GitHub CI
system, only GNU/Linux supports this option.  But, network
device names other than "lo" change too often on GNU/Linux
to know in advance what an interface might be called.  This
limits what can be reliably tested.

10 months agohandle long input lines when reading from file
Erik Auerswald [Sun, 26 Jan 2025 19:48:25 +0000 (20:48 +0100)]
handle long input lines when reading from file

This addresses GitHub isse #377.

Before, input lines longer than the static buffer used to read
data would be handled as if each buffer part were one line.
This could result in splitting input target names into multiple
different target names.

Since the static buffer was significantly smaller then the maximum
length of DNS names (just short of 255 one octet characters),
valid long DNS names could not be read as targets via file.

This commit fixes the splitting of long lines, and also increases
the maximum length of target names to 255 one octet characters.

The additional line parsing code is kept similar to the existing
code and attempts to keep all intended and/or useful features to
minimize the risk of regressions.

10 months agotests for useful input file features
Erik Auerswald [Fri, 24 Jan 2025 21:45:26 +0000 (22:45 +0100)]
tests for useful input file features

* whitespace in sufficiently short lines is skipped
* additional words after the target are ignored in sufficiently
  short lines
* whitespace-only (i.e., blank, but not empty) lines are skipped
* DOS-format text files, i.e., lines terminated with CRLF, work
* input need not be a correct POSIX text file, i.e., non-empty
  input does not need to end with LF

10 months agoIPv6 support for -g, --generate
Erik Auerswald [Wed, 15 Jan 2025 16:42:12 +0000 (17:42 +0100)]
IPv6 support for -g, --generate

The limit for generated addresses is increased by two to
allow /111 IPv6 prefixes similar to /15 IPv4 prefixes.

The implementation uses two unsigned 64 bit integers to
represent a single IPv6 address.  The required arithmetic
is open-coded and limited to what is needed to implement
IPv6 support for -g, --generate.

This addresses GitHub issue #59.

10 months agoreorganize add_cidr()/add_range()
Erik Auerswald [Sun, 12 Jan 2025 09:58:53 +0000 (10:58 +0100)]
reorganize add_cidr()/add_range()

This creates a code structure suitable to add IPv6 versions
of the functions used to generate addresses.

10 months agocheck address family consistency in generator
Erik Auerswald [Sun, 12 Jan 2025 09:37:55 +0000 (10:37 +0100)]
check address family consistency in generator

Before, "fping -6 -g IPv4_ADDR_SPEC" would generate all requested
IPv4 addresses and try to add them to the host table, but that
would fail because of address family mismatch.

Now, "fping -6 -g IPv4_ADDR_SPEC" detects the problem before
generating any addresses, and fails early.

Mixing IPv4 and IPv6 addresses when using -g START END is detected
before generating any addresses and fails early, too.

11 months agocomplete SO_TIMESTAMPNS to SO_TIMESTAMP fallback
Erik Auerswald [Thu, 16 Jan 2025 11:12:51 +0000 (12:12 +0100)]
complete SO_TIMESTAMPNS to SO_TIMESTAMP fallback

Commit e8660637ccc3bf2aae163fa7c26216843ae98180 added a
fallback from setting the socket option SO_TIMESTAMPNS to
setting the socket option SO_TIMESTAMP if the nanosecond
timestamp option could not be set.  But it did not add
code to also look for the control message related to
SO_TIMESTAMP.  Thus microsecond timestamps were requested,
but not read.

This commit adds the missing code to read microsecond
timestamp control messages.

The problem was reported in GitHub issue #374 by @payload.

12 months agoRelease v5.3 v5.3
David Schweikert [Thu, 2 Jan 2025 17:00:09 +0000 (18:00 +0100)]
Release v5.3

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

12 months 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

12 months agoPrepare 5.3-rc2 v5.3-rc2
David Schweikert [Sat, 14 Dec 2024 17:50:41 +0000 (18:50 +0100)]
Prepare 5.3-rc2

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

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

13 months agoPrepare 5.3-rc1 v5.3-rc1
David Schweikert [Sun, 8 Dec 2024 09:27:10 +0000 (10:27 +0100)]
Prepare 5.3-rc1

13 months 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

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

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

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

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

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