summaryrefslogtreecommitdiff
path: root/stun/usages/turn.h
diff options
context:
space:
mode:
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>2017-11-27 17:07:02 -0500
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>2017-11-28 16:45:37 -0500
commit59fcf95d505c3995f858b826d10cd48321ed383e (patch)
tree7d73526cd1f8e71891dd67d60359bb68c97d8c06 /stun/usages/turn.h
parent17f30e4465efe9533799b02d6f95feeaf0f2748c (diff)
downloadlibnice-59fcf95d505c3995f858b826d10cd48321ed383e.tar.gz
turn: Add support for ALTERNATE_SERVER in OC2007 Compatibility
The MS Office TURN servers will always return the MS_ALTERNATE_SERVER in allocation responses, and if they are not handled, we end up using the main turn server to send allocation requests that then get sent to the alternate server which will return the XOR_MAPPED_ADDRESS containing the IP address of the turn server that proxied the message instead of our own actual external IP.
Diffstat (limited to 'stun/usages/turn.h')
-rw-r--r--stun/usages/turn.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/stun/usages/turn.h b/stun/usages/turn.h
index 7a2d4e6..83fa00a 100644
--- a/stun/usages/turn.h
+++ b/stun/usages/turn.h
@@ -256,6 +256,10 @@ size_t stun_usage_turn_create_permission (StunAgent *agent, StunMessage *msg,
* Allocate request, in case the currently used TURN server is requesting the use
* of an alternate server. This argument will only be filled if the return value
* of the function is #STUN_USAGE_TURN_RETURN_ALTERNATE_SERVER
+ * In the case of @STUN_USAGE_TURN_COMPATIBILITY_OC2007 compatibility, the
+ * @alternate_server could be filled at any time, and should only be considered
+ * if the request was sent to a different server than the address returned
+ * in the @alternate_server field
* @alternate_server_len: The length of @alternate_server
* @bandwidth: A pointer to fill with the bandwidth the TURN server allocated us
* @lifetime: A pointer to fill with the lifetime of the allocation