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

case sensitive domain based forwarding #14

Open
gh-ix opened this issue Jun 11, 2019 · 2 comments
Open

case sensitive domain based forwarding #14

gh-ix opened this issue Jun 11, 2019 · 2 comments

Comments

@gh-ix
Copy link

gh-ix commented Jun 11, 2019

Hello, a rather nasty issue with windows clients: Some of them query WINDOMAIN.LOCAL – upper case.
Which dnrd doesn't match against "-s 169.254.0.53:windowmain.local".
Adding the same upper case doesn't work either.
This badly breaks real world ActiveDirectory clients.
Will have a look to fix myself, but skills and tthe resulting time needed scare me...

And there's another ugly thing to cope with:
Some cisco phones require case sensitive answers: https://drjohnstechtalk.com/blog/2015/04/example-of-case-sensitive-dns-usage/
Don't know if that would work with current code... (assuming upstream DNS responds case sensitive).

Thanks,
-harry

@gh-ix
Copy link
Author

gh-ix commented Jun 11, 2019

Excuse the typo above, (edit doesn't work here), it's only about case sensitivity, the config in my real world setup dusn't suffer from that typo!

@gh-ix
Copy link
Author

gh-ix commented Jun 11, 2019

For the records:
This very poor and uninvestigated diff solves my problem for now:
--- domnode.c 2004-10-19 13:45:21.000000000 +0000
+++ /tmp/domnode.c 2019-06-11 18:58:34.736213000 +0000
@@ -157,7 +157,7 @@
will be encoded as "\3yes\3org" while hayes.org will be encoded
as "\5hayes\3org"
*/

  • if ((strncmp(d->domain, p, maxlen - (p - name)) == 0) && (h > maxfound)) {
  • if ((strncasecmp(d->domain, p, maxlen - (p - name)) == 0) && (h > maxfound)) {
    maxfound = h; /* max length found */
    curr = d;
    }

No Idea about the checks before, so maybe this is foot-shooting. But better than head-shooting ;-)

-harry

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

1 participant