KeyNotFound crash if resource response with extra subdomain in search
cfeilen opened this issue · comments
I have a use case where resources register multiple names (unique and non-unique). The unique subdomain causes a KeyNotFound crash in NetworkInterfaceHandler.HandlePacketServiceInfos.
My use case:
- Machine registers {HOSTNAME}.{ServiceName}.local.
- Machine registers {HOSTNAME}.{SMBIOS_GUID}.{ServiceName}.local.
In the case where this app receives the name with the SMBIOS GUID, it will crash.
I'll have a PR out in a second, seems like a quick check for the service handler is all that is needed.
** Quick aside, we register each machine with two records, because the host name is not guaranteed to be unique in our labs. We need to have something which is unique, so have chosen to use the SMBIOS GUID as a subdomain. That way we can search for "everything" based on the {ServiceName}.local., or a specific instance with {GUID}.{ServiceName}.local.
subdomain
I haven't seen this in practice. Is this valid for mdns?
We need to have something which is unique
A common pattern I've seen is postpending with a dash and last 3 bytes of mac address, e.g. device-deadbe.
a KeyNotFound crash in NetworkInterfaceHandler.HandlePacketServiceInfos.
It would be good to fix this.