mdnsd icon indicating copy to clipboard operation
mdnsd copied to clipboard

label compression is too simple

Open ago opened this issue 12 years ago • 2 comments

Hi!

I also found that label compression code compares only full labels, not parts of it. For example the second domain name in response with a single answer: a._tcp.local PTR b._tcp.local can be compressed like this: 0000000: 01 62 c0 0e It won't even handle this case: a.b._tcp.local PTR b._tcp.local

I've seen several mdns implementations and I wonder: why doesn't anybody use dn_expand() and dn_comp()? Is there something wrong with them? I think, they should be available on OpenBSD...

ago avatar Dec 25 '12 10:12 ago

Also TXT rdata must not be compressed, as stated in section 18.14 of mdns draft.

ago avatar Dec 25 '12 11:12 ago

Indeed, compression was written poorly, it has been a long time, but I'm almost sure there was an issue with dn_expand/dn_comp, but can't be sure, we should fix it anyhow.

haesbaert avatar Jan 02 '13 08:01 haesbaert