[Dnsmasq-discuss] Option 12 hostname sent to RPi seems incorrect

Matthias May matthias.may at westermo.com
Sun Oct 24 19:17:28 UTC 2021


On 21/10/2021 13:05, Shrenik Bhura wrote:
> May be the code that logs this line needs to be checked if it is just printing part of the complete hostname i.e. IP
> address.
> 

Hi Shrenik

The code is doing what it is supposed to do.

Please take a look at the definition of a hostname and what makes up an FQDN.
* https://en.wikipedia.org/wiki/Hostname
* https://en.wikipedia.org/wiki/Fully_qualified_domain_name

Valid characters for hostnames are:
* ASCII(7) letters from a to z
* The digits from 0 to 9
* The hyphen (-)
* A hostname may not start with a hyphen
* When following the old RFC 952, a hostname may not start with a digit.

The dot '.' is used to concatenate the different domain labels.

In your case you are using an IP address as hostname which is not a valid hostname.
The first dot in the name you provide is interpreted as domain label separator, thus the hostname is 192.

BR
Matthias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20211024/549ae062/attachment.sig>


More information about the Dnsmasq-discuss mailing list