Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

label compression is too simple #3

Open
ago opened this issue Dec 25, 2012 · 2 comments
Open

label compression is too simple #3

ago opened this issue Dec 25, 2012 · 2 comments

Comments

@ago
Copy link

ago commented Dec 25, 2012

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
Copy link
Author

ago commented Dec 25, 2012

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

@haesbaert
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants