TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.47k stars 431 forks source link

Devices with a space in the host name cause DHCP server not to bind on server restart #71

Closed PonchoPowers closed 4 years ago

PonchoPowers commented 5 years ago

I have two lifx bulbs, they both share the same hostname:

lifx bulb

This causes an exception to be thrown when starting the DHCP server after a reboot of the physical server.

To help you in the right direction I need to spend some more time debugging, but in order to ensure I don't forget to log this as a bug I'm logging it anyway.

ShreyasZare commented 5 years ago

Thanks for the feedback. If multiple devices have same hostname then its expected behavior that the last one to get lease will overwrite the DNS entries with its address. If there is any exception then do share the stack trace.

PonchoPowers commented 5 years ago

Sorry my bad, the issue isn't a duplicate hostname, it is a space in the name, giving the following exception:

image

Label byte is:

32

image

What I'm even more surprised about is that my router provides a different host name that it refers to as the Host ID:

image

PonchoPowers commented 5 years ago

Seems this is an issue others have had to deal with too: https://community.ui.com/questions/Hostname-Display-Inconsistency-With-UniFi/f2dad1ad-0ca0-442b-a020-ea810b6d402e

You would think that Lifx would know better.

ShreyasZare commented 5 years ago

You would think that Lifx would know better.

Well, what to expect from IoT devices. I will just add a line to replace space with hyphen.

PonchoPowers commented 5 years ago

I will just add a line to replace space with hyphen.

I patched it by doing the same, was a quick and easy fix.

ShreyasZare commented 4 years ago

Technitium DNS Server v4.1 is now available that fixes this issue.