Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this change, a new config option
Subrealmsis introduced into therealmconfig block.The idea is to allow for a much cleaner configuration file without to many regexes, which are prone to human error in many ways. (Forgetting backslash before dot, inaccurate matching groups, not easy to read and understand, ...)
Instead of cumbersomely writing
realm /@([^@]*\.)?example\.com$/to match the realm together with all sub-realms, you now can simply writeSince non-regex realm configurations are internally converted to regexes anyway, this configuration option is just a shortcut.
The given options are:
No: Default, Same behavior as before (example.com->@example\.com)Include: Include all subrealms, as well as the base realms (example.com->@([^@]*\.)?example\.com)Only: Include only subrealms, but not the base realm (example.com->@[^@]*\.example\.com)Anoter goal of this patch is to fix some dynamic lookup problems.
Especially with a default route, dynamic lookups can cause loops if subrealms are not specified explicitly, but due to a NAPTR records, they are routed to the own server by the upstream server.
A working, simple configuration could look like this:
Open Discussion Points / Untested code / WIP-Points:
addrealm()function signature. This function is also used inadddynamicrealmserver. I have not yet fully understood the whole code, so there may be some additional changes necessary.subrealms, that, as far as I understood, is used for dynamic server lookups. This is a potentially confusing overload of the term 'subrealm' in the code.