Bug 15056 - `hostname -i` fails on ipv6 hosts
Summary: `hostname -i` fails on ipv6 hosts
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: 1.35.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-13 23:20 UTC by c
Modified: 2022-10-13 23:20 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.