Bug 15056

Summary: `hostname -i` fails on ipv6 hosts
Product: Busybox Reporter: c
Component: NetworkingAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.35.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description c 2022-10-13 23:20:27 UTC
Attempting to run `hostname -i` on an Alpine Linux container in an IPv6 Kubernetes installation fails to resolve the host, despite the ip and hostname being present in /etc/hosts. On the other hand, this works in an Ubuntu container.

Presumably this is due to the use of gethostbyname, rather than getaddrinfo.