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

Wildcard services not properly mapping port in range #578

Closed
dovholuknf opened this issue Jan 5, 2023 · 1 comment · Fixed by #579
Closed

Wildcard services not properly mapping port in range #578

dovholuknf opened this issue Jan 5, 2023 · 1 comment · Fixed by #579

Comments

@dovholuknf
Copy link
Member

see https://openziti.discourse.group/t/interesting-issue-with-multiple-networks/956/7

User has a wildcard service and other services defined along with a port range defined on the wildcard service. The logs very clearly show:

  • each service is being processed by the tunneler properly and IP is assigned.
  • stafford.esxi is assigned IP 100.64.0.4
  • a request comes in for matching domain[*.cla.local] found for tnas001.cla.local
  • the tunneler processes the wildcard match and assigns tnas001.cla.local -> 100.64.0.22
  • tunneler correctly returns 100.64.0.22 to the DNS response
  • intercepts the proper IP with on the proper port, but then mismaps the service entirely and dials the wrong service
@scareything
Copy link
Member

When matching wildcard domain addresses, we were using the address matching function from ziti-sdk-c incorrectly. The matching function returns a score where -1 is a mismatch, 0 is an exact match, and larger integers are lesser matches, but the return value was being interpreted as boolean.

This caused matches on wildcard domains to incorrectly be counted as matching when compared against plain hostname addresses.

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

Successfully merging a pull request may close this issue.

2 participants