public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "me at ruff dot mobi" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug network/14990] getaddrinfo with servname=NULL returns duplicate addresses Date: Thu, 07 Mar 2013 19:29:00 -0000 [thread overview] Message-ID: <bug-14990-131-lix654HLyZ@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-14990-131@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=14990 --- Comment #6 from Ruslan N. Marchenko <me at ruff dot mobi> 2013-03-07 19:29:01 UTC --- > Please look at it from the perspective of both the POSIX standard and the fact > that getaddrinfo() was designed to replace both gethostbyname(). This is the only point I'm looking at it from >> Hence getaddrinfo(something,null,whatever) should always return RAW. >Incorrect, in my opinion. >> Similarly asking for RAW should ignore service since there's no service >> for raw socket. > Above you asked hints to be always ignored when service is NULL. Yes, this is not explicitly written by standard so my common sense is saying that it's useless to parse socktype when service s null. although one can always return error for unclear by standard cases. > Using AI_PASSIVE with non-null host makes perfect sense even > though AI_PASSIVE is ignored then. I think we need to be careful with common sense when dealing with explicitly stated standard: http://pubs.opengroup.org/onlinepubs/009695399/functions/getaddrinfo.html >> qoute >> The AI_PASSIVE flag shall be ignored if the nodename argument is not null. << end quote << > You and many others are forgetting that the flags and the values usually don't come from the same source. I don't, and that the background for my reasoning. >The Python function is a convenience wrapper over the C call, there's no need to compare them. right, my c snippet initially was returning different result so i started this C part but then i found i was setting socktype at the end. You can disregard it. > The patch is already available as part of my patchset: Glad you care about that. And since getaddrinfo is to be completely revamped anyway I'm going to propose another solution for passive flag. -- 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.
next prev parent reply other threads:[~2013-03-07 19:29 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-30 12:54 [Bug network/14990] New: getaddrinfo with servname=NULL returns addresses multiple times psimerda at redhat dot com 2013-01-11 14:50 ` [Bug network/14990] getaddrinfo with servname=NULL returns duplicate addresses psimerda at redhat dot com 2013-01-11 15:29 ` psimerda at redhat dot com 2013-01-11 15:58 ` psimerda at redhat dot com 2013-01-11 16:11 ` psimerda at redhat dot com 2013-02-24 22:12 ` psimerda at redhat dot com 2013-03-07 7:28 ` me at ruff dot mobi 2013-03-07 12:01 ` psimerda at redhat dot com 2013-03-07 19:29 ` me at ruff dot mobi [this message] 2013-03-07 19:55 ` me at ruff dot mobi 2014-06-14 5:24 ` fweimer at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-14990-131-lix654HLyZ@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).