public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/4671] gethostbyname() cant resolve names starting/ending with "-"
       [not found] <bug-4671-131@http.sourceware.org/bugzilla/>
@ 2011-01-07 18:49 ` bugs at randomguy3 dot me.uk
  2012-02-21  1:22 ` [Bug network/4671] " jsm28 at gcc dot gnu.org
  2014-07-04 16:19 ` fweimer at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: bugs at randomguy3 dot me.uk @ 2011-01-07 18:49 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=4671

Alex Merry <bugs at randomguy3 dot me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugs at randomguy3 dot
                   |                            |me.uk

--- Comment #7 from Alex Merry <bugs at randomguy3 dot me.uk> 2011-01-07 18:49:07 UTC ---
(In reply to comment #6)
> "The DNS itself places only one restriction on the particular labels that can
> be used to identify resource 
> records.  That one restriction relates to the length of the label and the full
> name. [...] Those restrictions 
> aside, any binary string whatever can be used as the label of any resource
> record."
>   -- RFC 2181, section 11
> 
> RFC3696, section 2 verifies this: "Any characters, or combination of bits (as
> octets), are permitted in 
> DNS names." Then it describes how the old ARPANET rules worked. But we moved
> beyond those 
> rules a long time ago. Just look at the international domain names.

Actually, while RFC 2181 states that there are no restrictions on DNS labels,
it does not say anything about host names (not all records that can be stored
in DNS are host names).  In fact, it explicitly says that

"Note however, that the various applications that make use of DNS data can have
restrictions imposed on what particular values are acceptable in their
environment."

RFC 1123 still constitutes the accepted standard for valid host names, and this
is what glibc's gethostbyname() implements.  Actually, glibc implements a
relaxation of RFC1123 that allows underscores anywhere RFC1123 permits hyphens,
presumably to deal with errant Windows machines that like to put underscores in
their names.

RFC 3696 is quite woolly on the subject of host names.  It describes RFC 1123's
restrictions on host names as "a preferred form that is required by most
applications".

Also, international domain names are a different matter entirely, as they
essentially work (as I understand it) by converting invalid host names to RFC
1123-compatible host names.

Arguing by RFC is clearly not going to get us anywhere, given the above.  The
best argument for this change is that there are domains that require
gethostbyname() to accept hyphens (and, presumably, underscores) at the start
and end of domain segments in order to be resolved.  Glibc already relaxes RFC
1123's restrictions to allow underscores, so why not allow hyphens in any
position as well?

The argument about mistaking domain names starting with hyphens for options is
spurious, by the way.  Given that these domains exist, it's perfectly
reasonable that they might be passed to a tool regardless of whether or not
gethostbyname() accepts them, and the tool will do option parsing before
calling gethostbyname().

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug network/4671] gethostbyname() cant resolve names starting/ending with "-"
       [not found] <bug-4671-131@http.sourceware.org/bugzilla/>
  2011-01-07 18:49 ` [Bug libc/4671] gethostbyname() cant resolve names starting/ending with "-" bugs at randomguy3 dot me.uk
@ 2012-02-21  1:22 ` jsm28 at gcc dot gnu.org
  2014-07-04 16:19 ` fweimer at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-02-21  1:22 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=4671

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libc                        |network

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug network/4671] gethostbyname() cant resolve names starting/ending with "-"
       [not found] <bug-4671-131@http.sourceware.org/bugzilla/>
  2011-01-07 18:49 ` [Bug libc/4671] gethostbyname() cant resolve names starting/ending with "-" bugs at randomguy3 dot me.uk
  2012-02-21  1:22 ` [Bug network/4671] " jsm28 at gcc dot gnu.org
@ 2014-07-04 16:19 ` fweimer at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-07-04 16:19 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=4671

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-04 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-4671-131@http.sourceware.org/bugzilla/>
2011-01-07 18:49 ` [Bug libc/4671] gethostbyname() cant resolve names starting/ending with "-" bugs at randomguy3 dot me.uk
2012-02-21  1:22 ` [Bug network/4671] " jsm28 at gcc dot gnu.org
2014-07-04 16:19 ` fweimer at redhat dot com

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).