summaryrefslogtreecommitdiffstats
path: root/remoting/protocol
diff options
context:
space:
mode:
authornoamsml@google.com <noamsml@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 17:04:23 +0000
committernoamsml@google.com <noamsml@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 17:04:23 +0000
commit11f9efbe87642781a5e03fc760cc16c7f31a97f9 (patch)
treeb82b65f3d0102be411e18687fbf8346543224326 /remoting/protocol
parent0e24b8b0e03a669eb93193fd2592350430f07914 (diff)
downloadchromium_src-11f9efbe87642781a5e03fc760cc16c7f31a97f9.zip
chromium_src-11f9efbe87642781a5e03fc760cc16c7f31a97f9.tar.gz
chromium_src-11f9efbe87642781a5e03fc760cc16c7f31a97f9.tar.bz2
Revert 267242 "Revert 267234 "New policies: enable/disable relay..."
Reland due to accidental incorrect revert. > Revert 267234 "New policies: enable/disable relay; port range" > > > New policies: enable/disable relay; port range > > > > Add new Chromoting policies: > > > > "RemoteAccessHostAllowRelayedConnection" > > bool, default true > > It can be set to false to disable the use of relay servers if NAT > > traversal is enabled. > > > > "RemoteAccessHostUdpPortRange" > > string, default "" > > Can be used to specify a range in the form "<min-port>-<max-port>" to > > restrict the range of UDP ports available to the host for connections. > > E.g. "12400-12409" > > > > BUG=355168 > > > > Review URL: https://codereview.chromium.org/209323002 > > TBR=dcaiafa@chromium.org > BUG=368724 > > Review URL: https://codereview.chromium.org/268483003 TBR=noamsml@google.com Review URL: https://codereview.chromium.org/261633005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r--remoting/protocol/libjingle_transport_factory.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/remoting/protocol/libjingle_transport_factory.cc b/remoting/protocol/libjingle_transport_factory.cc
index b37cbb4..332665d 100644
--- a/remoting/protocol/libjingle_transport_factory.cc
+++ b/remoting/protocol/libjingle_transport_factory.cc
@@ -205,10 +205,8 @@ void LibjingleStreamTransport::DoStart() {
this, &LibjingleStreamTransport::OnRouteChange);
channel_->SignalWritableState.connect(
this, &LibjingleStreamTransport::OnWritableState);
- if (network_settings_.nat_traversal_mode ==
- NetworkSettings::NAT_TRAVERSAL_DISABLED) {
- channel_->set_incoming_only(true);
- }
+ channel_->set_incoming_only(
+ !(network_settings_.flags & NetworkSettings::NAT_TRAVERSAL_OUTGOING));
channel_->Connect();
@@ -452,8 +450,9 @@ LibjingleTransportFactory::CreateDatagramTransport() {
}
void LibjingleTransportFactory::EnsureFreshJingleInfo() {
- if (network_settings_.nat_traversal_mode !=
- NetworkSettings::NAT_TRAVERSAL_ENABLED ||
+ uint32 stun_or_relay_flags = NetworkSettings::NAT_TRAVERSAL_STUN |
+ NetworkSettings::NAT_TRAVERSAL_RELAY;
+ if (!(network_settings_.flags & stun_or_relay_flags) ||
jingle_info_request_) {
return;
}