Skip to content

TELECOM-10394: Add subnet mask matching to sockets#81

Merged
davidtrihy-genesys merged 1 commit into3.4-genesysfrom
TELECOM-10394
Nov 4, 2024
Merged

TELECOM-10394: Add subnet mask matching to sockets#81
davidtrihy-genesys merged 1 commit into3.4-genesysfrom
TELECOM-10394

Conversation

@davidtrihy-genesys
Copy link
Copy Markdown
Collaborator

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 16 means any sequential from 10.27.0.0 will match when getting socket info and topology_hiding will work

@davidtrihy-genesys davidtrihy-genesys force-pushed the TELECOM-10394 branch 4 times, most recently from 28598b6 to 68e7a75 Compare November 1, 2024 17:49
@davidtrihy-genesys
Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants