Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Unified Diff: webrtc/p2p/base/turnport.h

Issue 1595613004: Reset TURN port NONCE when a new socket is created. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/turnport.cc » ('j') | webrtc/p2p/base/turnport.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnport.h
diff --git a/webrtc/p2p/base/turnport.h b/webrtc/p2p/base/turnport.h
index 4d83806a37126f96fad74abc83f942d494b79630..af49dc6c880eeabb3a62b50165928b74bf8a68fe 100644
--- a/webrtc/p2p/base/turnport.h
+++ b/webrtc/p2p/base/turnport.h
@@ -152,6 +152,10 @@ class TurnPort : public Port {
// Returns true if the entry is found.
bool SetEntryChannelId(const rtc::SocketAddress& address, int channel_id);
+ // For testing only.
+ void set_nonce(const std::string& nonce) { nonce_ = nonce; }
+ void set_hash(const std::string& hash) { hash_ = hash; }
+
protected:
TurnPort(rtc::Thread* thread,
rtc::PacketSocketFactory* factory,
@@ -192,8 +196,6 @@ class TurnPort : public Port {
virtual void OnMessage(rtc::Message* pmsg);
bool CreateTurnClientSocket();
-
- void set_nonce(const std::string& nonce) { nonce_ = nonce; }
void set_realm(const std::string& realm) {
if (realm != realm_) {
realm_ = realm;
@@ -232,6 +234,7 @@ class TurnPort : public Port {
const rtc::PacketOptions& options);
void UpdateHash();
bool UpdateNonce(StunMessage* response);
+ void ResetNonce();
bool HasPermission(const rtc::IPAddress& ipaddr) const;
TurnEntry* FindEntry(const rtc::SocketAddress& address) const;
« no previous file with comments | « no previous file | webrtc/p2p/base/turnport.cc » ('j') | webrtc/p2p/base/turnport.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698