TELECOM-10394: Add subnet mask matching to sockets#81
Merged
davidtrihy-genesys merged 1 commit into3.4-genesysfrom Nov 4, 2024
Merged
TELECOM-10394: Add subnet mask matching to sockets#81davidtrihy-genesys merged 1 commit into3.4-genesysfrom
davidtrihy-genesys merged 1 commit into3.4-genesysfrom
Conversation
benceszigeti
approved these changes
Nov 1, 2024
bcnewlin
approved these changes
Nov 1, 2024
28598b6 to
68e7a75
Compare
68e7a75 to
170f78a
Compare
Collaborator
Author
|
Just to note here, I altered the implementation for this to only affect topology_hiding, the reasoning being is my initial implementation added the subnet check to all check_self calls and that is used in many places where we would not want a subnet match to affect |
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.
A regression was introduced in this PR in sipproxy-v2 https://bitbucket.org/inindca/sipproxy-v2/pull-requests/66/diff
When we started using topology_hiding we set it to use the public DNS address internally and externally and when we called the topology_hiding_match check_self was matched against the advertised address which was byoc.use1.genesys.cloud, this was the contact domain both internally and externally. Sequential requests from the dialog to the transaction server ignored the request domain in favour of using the dispatch module because we didn't need to tie sequential requests to a particular instance, if it crashes we are not guaranteed to get that IP address again and if the ASG scales down that instance is gone so sequentials would fail and the thinfo param contained all of the required routing information anyway so it could be processed on any instance.
In the above PR we changed it so that the contact domain was set to the DNS address with the trunk identifier on requests outbound from Genesys Cloud only and the internal contact domain was the private IP address of the instance, when sequentials would be sent to an instance it would fail if that request domain did not match the socket on the instance we are processing the request on, it hid for a while because the ASG size was small enough that the dispatcher table would get back to the correct instance eventually.
Now we decorate all of our sockets with a new param which defines a subnet mask to match on
socket=10.27.150.250 subnet_mask 16means any sequential from10.27.0.0will match when getting socket info and topology_hiding will work