Re: ping acting strangely on 13.3

From: Paul Procacci <pprocacci_at_gmail.com>
Date: Sat, 09 Mar 2024 03:17:56 UTC
On Fri, Mar 8, 2024 at 9:54 PM Andrea Venturoli <ml@netfence.it> wrote:

> Hello.
>
> On some machines I completely removed IPv6 by commenting "options INET6"
> in the kernel.
> I've recently upgraded one of these from 13.2 to 13.3 and now ping is
> behaving differently from before.
>
> > % host www.google.it
> > www.google.it has address 216.58.204.227
> > www.google.it has IPv6 address 2a00:1450:4002:415::2003
> > % ping www.google.it
> > ping: socket ssend: Address family not supported by protocol family
> > % ping -4 www.google.it
> > PING www.google.it (216.58.204.227): 56 data bytes
> > 64 bytes from 216.58.204.227: icmp_seq=0 ttl=117 time=13.422 ms
> > 64 bytes from 216.58.204.227: icmp_seq=1 ttl=117 time=15.746 ms
> > ^C
>
> On 13.2 and 14.0 (and every previous version I ever used), the first
> ping ("ping www.google.it") behaves exactly as if "-4" was given.
>
> I din't read anything about this change in release notes (unless I'm
> failing to understand something) and the ping man pages are identical.
>
> Is this some regression? Do I need to set something?
> Are others seeing this?
> Shall I report this as a bug?
>
>   bye & Thanks
>         av.
>
>
This is less likely a change to `ping` and more likely a change to the
resolver.
From ping(8):

"When invoked with a hostname, the version to which the target is resolved
     first is used."

If you haven't already, set ipv6_activate_all_interfaces="NO"

I'm not entirely sure whether or not this affects it, but it makes sense
that if there's no transport for ipv6 available, it shouldn't provide you
with an answer that requires ipv6.

~Paul

-- 
__________________

:(){ :|:& };: