Skip to content

Mistaken same-host rendezvous mode may result in misleading error reports #369

@ethouris

Description

@ethouris

When you try to make a rendezvous-type connection to another host, while the destination host actually resolves to localhost (or, more simply, when the bound IP address is the same as the target IP address), it causes unexpected things to happen and it causes misleading errors.

That is, the result is that the packet sent to the socket is then received back by the sender as if it had received a packet from the "peer", and it tries to resolve it as a peer's handshake. In case of HSv5 this results in having equal cookies, which causes an immediate error due to unresolved cookie contest, however this happens immediately after running this command, without even starting the command on the "peer side". This "problem resolution" is however rather accidental, and it is desired that the problem be resolved more predictable way.

Normally the rendezvous sockets have to be first bound locally, so I think it should be enough to check in the function called directly from srt_connect that if this a rendezvous socket, then the target IP address must differ to the bound IP address, otherwise this function results in error.

Metadata

Metadata

Assignees

Labels

Priority: Medium[apps]Area: Test applications related improvements

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions