From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29450 invoked by alias); 4 Apr 2013 09:33:16 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 29426 invoked by uid 48); 4 Apr 2013 09:33:11 -0000 From: "siddhesh at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug network/15339] New: getaddrinfo returns EAI_SYSTEM instead of EAI_NONAME when the network is down Date: Thu, 04 Apr 2013 09:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: network X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: siddhesh at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: siddhesh at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg00029.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15339 Bug #: 15339 Summary: getaddrinfo returns EAI_SYSTEM instead of EAI_NONAME when the network is down Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: network AssignedTo: siddhesh@redhat.com ReportedBy: siddhesh@redhat.com Classification: Unclassified Due to the fix to bug 14719, getaddrinfo incorrectly returns EAI_SYSTEM instead of EAI_NONAME when the network is down. Steps to Reproduce: $ cat t.c #include #include int main(void) { struct addrinfo *ai; int res = getaddrinfo ("example.net", "http", 0, &ai); if (res) printf("%s: %m\n", gai_strerror(res)); return res && res != EAI_NONAME; } $ gcc -Wall -O2 t.c -o t $ sudo unshare -n ./t Actual Result: System error: Connection refused Expected Result: Name or service not known: Connection refused -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.