Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3675 - getaddrinfo prefers IPv6 and fails when there is no IPv6 connectivity #6986

Open
openwrt-bot opened this issue Mar 9, 2021 · 1 comment
Labels
flyspray release/19.07

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Mar 9, 2021

Malakai:

As stated in the summary, getaddrinfo prefers IPv6 and fails when there is no IPv6 connectivity which causes issues with some functionalities.
For instance, I opened this [[https://forum.openwrt.org/t/collectd-network-plugin-getaddrinfo-failed-system-error/90546|thread]] on the forum about collectd network plugin complaining of "getaddrinfo failed: System error" when using a hostname that is resolvable only in IPv4 or an IPv4 address.
IPv6 is deactivated on my entire network (on the router and on the hosts) and this seems to cause that error message.
This is happening on a Linksys WRT1900ACS with OpenWrt 19.07.2 and on a TP-Link Archer C7 v5 with OpenWrt 19.07.7
Apparently, the issue is still relevant even when you do not disable IPv6 specifically. vgaetera (on the forum) tested OpenWrt 19.07.7 x86_64 as a KVM/QEMU guest with mostly default configuration. So, IPv6 is enabled but IPv6 connectivity is missing and the issue persists.

I am not sure if it is also related to getaddrinfo but another issue is when I flash a device with OpenWRT and there is no IPv6 connectivity, I can't use opkg at all. First I have to manually download full wget and install it and then opkg starts working.

For more details and troubleshooting about this getaddrinfo issue, check : https://forum.openwrt.org/t/collectd-network-plugin-getaddrinfo-failed-system-error/90546

@aparcar aparcar added the release/19.07 label Feb 22, 2022
@dandudikof
Copy link

@dandudikof dandudikof commented Apr 19, 2022

Second this same issue.

wrt1900ac | OpenWrt 21.02.0 ( as a dumb AP , no iptables nor dnsmasq)

Ipv6 is also disabled as much as possible. Except for stray interfaces on openwrt where i forget (option ipv6 '0')

Tue Apr 19 00:15:37 2022 daemon.err collectd[7313]: network plugin: getaddrinfo (192.168.17.66, 25822) failed: System error
Tue Apr 19 00:16:57 2022 daemon.err collectd[7313]: network plugin: getaddrinfo (192.168.17.66, 25822) failed: System error
Tue Apr 19 00:19:37 2022 daemon.err collectd[7313]: network plugin: getaddrinfo (192.168.17.66, 25822) failed: System error

collectd network output plugin configured for ip not hostname. And dns ptr(reverse ip to host) query returns correct.

thanx

EDIT: PS: removing option ipv6 '0' atleast for lo(loopback) solves the problem , but still seems like a bug.
ipv4 connectivity should not depend on ipv6 being enable somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/19.07
Projects
None yet
Development

No branches or pull requests

3 participants