Added support for an Origin header in STUN messages.
For WebRTC there are instances where it may be desirable to provide
information to the STUN/TURN server about the website that initiated
a peer connection. This modification allows an origin string to be
included in the MediaConstraints object provided by the browser, which
is then passed as a STUN header in communications with the server.
A separate change will be submitted to the Chromium project that
uses and is dependent on this change, implementing IETF draft
http://tools.ietf.org/html/draft-johnston-tram-stun-origin-02
Originally a patch from skobalt@gmail.com.
(https://webrtc-codereview.appspot.com/12839005/edit)
R=juberti@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/41409004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8035 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/p2p/base/stun.cc b/webrtc/p2p/base/stun.cc
index 60367fa..866621f 100644
--- a/webrtc/p2p/base/stun.cc
+++ b/webrtc/p2p/base/stun.cc
@@ -387,6 +387,7 @@
case STUN_ATTR_SOFTWARE: return STUN_VALUE_BYTE_STRING;
case STUN_ATTR_ALTERNATE_SERVER: return STUN_VALUE_ADDRESS;
case STUN_ATTR_FINGERPRINT: return STUN_VALUE_UINT32;
+ case STUN_ATTR_ORIGIN: return STUN_VALUE_BYTE_STRING;
case STUN_ATTR_RETRANSMIT_COUNT: return STUN_VALUE_UINT32;
default: return STUN_VALUE_UNKNOWN;
}