Description of problem: Calling getaddrinfo for an empty hostname returns an unexpected error. Version-Release number of selected component (if applicable): Fedora Rawhide Steps to Reproduce: ``` #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> #include <stdio.h> int main() { struct addrinfo* info; struct addrinfo hint; memset(&hint, 0, sizeof(struct addrinfo)); hint.ai_flags = AI_CANONNAME; hint.ai_family = AF_INET; int result = getaddrinfo("", NULL, &hint, &info); if (result != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(result)); } return result; } ``` Actual results: ``` result is 253: getaddrinfo: Temporary failure in name resolution ``` Expected results: ``` result is 254: getaddrinfo: Name or service not known ```
Can someone please take a look at this issue? I've assigned it to systemd, but the cause may be elsewhere in the name resolution. The issue causes a .NET test (https://github.com/dotnet/runtime/) to fail on Rawhide. Thanks, Tom
I created a PR for this issue in upstream: https://github.com/systemd/systemd/pull/22197
The previous PR is already merged, but will be replaced by https://github.com/systemd/systemd/pull/22231
Thanks for fixing the issue. Since last week, the issue is also appearing in our Fedora 35 CI VM. Previously it was only on Rawhide.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
FEDORA-2022-423231bb82 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-423231bb82
FEDORA-2022-423231bb82 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-423231bb82` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-423231bb82 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-423231bb82 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.