conncheck: Only valid stun messages used for Keepalive
authorJohan Sternerup <johast@axis.com>
Thu, 9 Jul 2020 11:37:27 +0000 (13:37 +0200)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Tue, 20 Oct 2020 22:07:44 +0000 (18:07 -0400)
commit306d471ae37ccf780ce3eed8b1acae685ba24830
treeed3e4a6abf09715704fa1c32ba741c98b35cf384
parent303f01796f3d5605dd5e9f2fc3f4dd4796f1994a
conncheck: Only valid stun messages used for Keepalive

Previously, a STUN response for which there was no associated request
would be considered valid media input and as such could keep a dead
connection alive. If peer A was communicating with peer B and peer B got
disconnected, the keepalive mechanism in peer A should detect this.
However, a misbehaving STUN server could keep sending STUN responses to
peer A which would then be considered a valid communication between A
and B and thereby prevent the keepalive mechanism from shutting down the
connection.

Situation above refers to a stun message validated as
STUN_VALIDATION_UNMATCHED_RESPONSE. With this change only messages
validated as STUN_VALIDATION_SUCCESS may keep the connection alive.
agent/agent.c
agent/conncheck.c