With limited amount of changes it would be possible to respond to more than just one name request. As far as I understood RFC 4795 it is also not forbidden for a single IP to be represented by multiple names.
The scenario I'm thinking of is, that a system has a generic name, ie "my-device.local" and a specific name "my-device-some-serial-number.local". This works with mdns, but not with this llmnr implementation.
The "--hostname" / "-H" parameter could be given multiple times.
Implementation idea:
If compiled with N=1 which matches current behaviour, there is only a little run-time overhead in llmnr_name_matches when the loop counter variable is evaluated.
WDYT?
If the idea sounds right to you, I could make a first draft MR.
With limited amount of changes it would be possible to respond to more than just one name request. As far as I understood RFC 4795 it is also not forbidden for a single IP to be represented by multiple names.
The scenario I'm thinking of is, that a system has a generic name, ie "my-device.local" and a specific name "my-device-some-serial-number.local". This works with mdns, but not with this llmnr implementation.
The "--hostname" / "-H" parameter could be given multiple times.
Implementation idea:
llmnr_initto take an array pointer.static char llmnr_hostname[LLMNR_LABEL_MAX_SIZE + 2];) to be an array of N char string entries.llmnr_set_hostnamewould always change the first entry.llmnr_name_matches: Loop over the array of char strings to determine if any of the entries match.If compiled with N=1 which matches current behaviour, there is only a little run-time overhead in
llmnr_name_matcheswhen the loop counter variable is evaluated.WDYT?
If the idea sounds right to you, I could make a first draft MR.