[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Discrepancy in ping behavior between Darwin BSD and Linux
From: |
Sirio Balmelli |
Subject: |
Discrepancy in ping behavior between Darwin BSD and Linux |
Date: |
Wed, 08 Dec 2021 12:05:12 +0000 |
Good afternoon,
I would like to report a bug in netutils 2.2 ping utility.
Using inetutils 2.2:
$ ping --version
ping (GNU inetutils) 2.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Sergey Poznyakoff.
Scenario:
Two simultaneous instances of ping, one pinging a valid address and the other
pinging an invalid address.
Expected behavior:
The instance of ping targeting the valid address shows valid responses. The
instance targeting the invalid address shows a ping timeout.
Observed behavior (Darwin/MacOS BSD only):
BOTH instances report a reply received.
Reproduction:
$ uname -a
Darwin computer 19.6.0 Darwin Kernel Version 19.6.0: Tue Oct 12 18:34:05 PDT
2021; root:xnu-6153.141.43~1/RELEASE_X86_64 x86_64 i386 MacBookPro16,1 Darwin
$ ping -c 1 --timeout 5 192.168.255.254 & ping -c 1 127.0.0.1
[1] 48368
PING 192.168.255.254 (192.168.255.254): 56 data bytes
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.046 ms
--- 127.0.0.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.046/0.046/0.046/0.000 ms
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.050 ms
--- 192.168.255.254 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.050/0.050/0.050/0.000 ms
[1]+ Done ping -c 1 --timeout 5 192.168.255.254
Correct behavior on Linux:
$ uname -a
Linux computer 5.10.78 #1-NixOS SMP Sat Nov 6 13:10:10 UTC 2021 x86_64 GNU/Linux
$ ping -c 1 --timeout 5 192.168.255.254 & ping -c 1 127.0.0.1
[1] 1824
PING 127.0.0.1 (127.0.0.1): 56 data bytes
PING 192.168.255.254 (192.168.255.254): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=36 time=0.082 ms
--- 127.0.0.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.082/0.082/0.082/0.000 ms
$ --- 192.168.255.254 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
[1]+ Exit 1 ping -c 1 --timeout 5 192.168.255.254
Environment:
The `inetutils` packages installed using Nix (https://nixos.org/) on both
platforms.
Please let me know if there is anything else I can do to help trace this down.
Thank you.
Best,
Sirio Balmelli
- Discrepancy in ping behavior between Darwin BSD and Linux,
Sirio Balmelli <=