Commit e9dfccb0 authored by Youness Alaoui's avatar Youness Alaoui

New STUN agent flag : NO_INDICATION_AUTH, to tell the agent that indication...

New STUN agent flag : NO_INDICATION_AUTH, to tell the agent that indication messages may not use authentication. Some turn servers will send data indications without username/message-integrity
parent ca46f08e
......@@ -183,7 +183,9 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg,
(agent->usage_flags & STUN_AGENT_USAGE_IGNORE_CREDENTIALS) ||
(stun_message_get_class (msg) == STUN_ERROR &&
stun_message_find_error (msg, &error_code) == 0 &&
(error_code == 400 || error_code == 401));
(error_code == 400 || error_code == 401)) ||
(stun_message_get_class (msg) == STUN_INDICATION &&
(agent->usage_flags & STUN_AGENT_USAGE_NO_INDICATION_AUTH));
if (key == NULL &&
ignore_credentials == 0 &&
......
......@@ -84,7 +84,8 @@ typedef enum {
#define STUN_AGENT_USAGE_USE_FINGERPRINT 0x0004
#define STUN_AGENT_USAGE_ADD_SOFTWARE 0x0008
#define STUN_AGENT_USAGE_IGNORE_CREDENTIALS 0x0010
#define STUN_AGENT_USAGE_FORCE_VALIDATER 0x0020
#define STUN_AGENT_USAGE_NO_INDICATION_AUTH 0x0020
#define STUN_AGENT_USAGE_FORCE_VALIDATER 0x0040
typedef struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment