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

Answer_16777238_272() is storing the wrong Diameter remote_peer which breaks async messages when a DRA is used #181

Open
nickvsnetworking opened this issue Jan 12, 2024 · 0 comments

Comments

@nickvsnetworking
Copy link
Owner

We get the remote peer based on this:

            try:        #Check if we have a record-route set as that's where we'll need to send the response
                remote_peer = self.get_avp_data(avps, 282)[-1]                          #Get first record-route header
                remote_peer = binascii.unhexlify(remote_peer).decode('utf-8')           #Format it
            except:     #If we don't have a record-route set, we'll send the response to the OriginHost
                remote_peer = OriginHost
            self.logTool.log(service='HSS', level='debug', message="[diameter.py] [Answer_16777238_272] [CCA] Remote Peer is " + str(remote_peer), redisClient=self.redisMessaging)
            remote_peer = remote_peer + ";" + str(self.config['hss']['OriginHost'])

If the peer is coming from a DRA, this will just get the Origin-Host, not the DRA connection,

We'll need to pass the source IP & port through, and then run that through Redis' ActiveDiameterPeers to find the peer.

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