[ldns-users] 回复: Re: string which does not conform with DNS protocol can be converted to ldns_rdf.

Jelte Jansen jelte.jansen at sidn.nl
Wed Aug 6 13:37:27 UTC 2014


RFC1035 is rather ambiguous about it, but there is a difference between
a domain name (as it appears in the DNS), and a host name (a domain name
pointing to a specific device); the rules as defined in 1035 (and 1194,
and others, IIRC), generally apply to hostnames, not necessarily domain
names. I am not sure whether this has been officially clarified and in
which RFC that would be.

But it has proven useful, by the way; as we now have a number of
protocols that use underscores in domain names (often to convey
information *about* hostnames or domains), like DKIM and SRV. The
underscore could be used without fear of conflicting with existing host
names.

In reality, most software doesn't actually do too much checking on this
level anyway; and any binary data is often accepted and served without
much complaints. Don't know if i still have it, but I ran a website once
on a name that had a dot within a label. But it is considered bad
practice to actually do things like that ;)

One could consider adding a 'check_valid_hostname(ldns_dname *)'
function or something, but I would personally not enable that by default
in the ldns_dname structure itself; garbage in garbage out.

Jelte


On 08/06/2014 03:15 PM, Liu Mingxing wrote:
> According to 2.3.1. Preferred name syntax in the rfc 1035, the char '('
> or '0' is not a letter, digit, or hyphen.
>  
> so, the string"(35)" is not a legal label or a legal domain name.
>  
> I do not understand what do you mean about the relationship
> between label and hostname?
>  
> ------------------------------------------------------------------------
> CNNIC
> Liu Mingxing
>  
> *发件人:* Ray Bellis <mailto:Ray.Bellis at nominet.org.uk>
> *发送时间:* 2014-08-06 16:00
> *收件人:* lmxhappy <mailto:lmxhappy at gmail.com>
> *主题:* Re: [ldns-users] string which does not conform with DNS
> protocol can be converted to ldns_rdf.
> 
> On 5 Aug 2014, at 04:20, Liu Mingxing <lmxhappy at gmail.com
> <mailto:lmxhappy at gmail.com>> wrote:
> 
>> Hi, all,
>> I found
>> string which does not conform with DNS protocol can be converted to ldns_rdf. 
>>  
>> The string is like "(35)"
>>  
>>  
>>     This should be a ldns bug.
> 
> That string is a legal DNS label, even if it's not permitted as part of
> a legal hostname.
> 
> Ray
> 
> 
> 
> _______________________________________________
> ldns-users mailing list
> ldns-users at open.nlnetlabs.nl
> http://open.nlnetlabs.nl/mailman/listinfo/ldns-users
> 




More information about the ldns-users mailing list