This works fine on 12.1. The "4" is part of the count -c argument. "ping6 -c 4 localhost" still works as expected. Cheers, Franco
The parsing of trying to validate -4 against -6 is so lax that this triggers on unknown and malformed arguments as well (things that don't actually take arguments). The most worrisome bug happens on # ping -c6 localhost Which pings localhost 6 times as expected, but with ping6 utility instead of ping (using ::1) as target. Cheers, Franco
(In reply to Franco Fichtner from comment #1) % ping localhost PING6(56=40+8+8 bytes) ::1 --> ::1 16 bytes from ::1, icmp_seq=0 hlim=64 time=0.039 ms 16 bytes from ::1, icmp_seq=1 hlim=64 time=0.086 ms 16 bytes from ::1, icmp_seq=2 hlim=64 time=0.048 ms 16 bytes from ::1, icmp_seq=3 hlim=64 time=0.046 ms 16 bytes from ::1, icmp_seq=4 hlim=64 time=0.078 ms 16 bytes from ::1, icmp_seq=5 hlim=64 time=0.076 ms 16 bytes from ::1, icmp_seq=6 hlim=64 time=0.098 ms ^C --- localhost ping6 statistics --- 7 packets transmitted, 7 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.039/0.067/0.098/0.021 ms %
% uname -KU 1400043 1400043 % ping -4 -c6 localhost PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.030 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.030 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.053 ms 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.075 ms 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.066 ms 64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.073 ms --- localhost ping statistics --- 6 packets transmitted, 6 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.030/0.055/0.075/0.019 ms % <https://www.freebsd.org/cgi/man.cgi?query=ping&sektion=8&manpath=FreeBSD>
(In reply to Franco Fichtner from comment #1) > … ping6 utility instead of ping … What are their inodes on 13.0-STABLE? Here, the inode is identical: % freebsd-version -k 14.0-CURRENT % ls -i /sbin/ping 5290690 /sbin/ping % ls -i /sbin/ping6 5290690 /sbin/ping6 %
Thanks for the hint. Looks like this is missing an MFC to stable/13. Moving to other ticket. Cheers, Franco *** This bug has been marked as a duplicate of bug 258048 ***