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

Unified Diff: remoting/host/it2me/it2me_host.cc

Issue 2901033002: Host port range policy is no longer ignored in it2me host (Closed)
Patch Set: Created 3 years, 7 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 | « remoting/host/it2me/it2me_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/it2me/it2me_host.cc
diff --git a/remoting/host/it2me/it2me_host.cc b/remoting/host/it2me/it2me_host.cc
index 17e7143541fc2d8f58256a01957bdd7da893b722..742e4081842f04bb0e9ad3c2d79fd6561dcd208a 100644
--- a/remoting/host/it2me/it2me_host.cc
+++ b/remoting/host/it2me/it2me_host.cc
@@ -330,6 +330,13 @@ void It2MeHost::OnPolicyUpdate(
UpdateClientDomainListPolicy(std::move(client_domain_list_vector));
}
+ // TODO(gusss) don't ignore port range
+ std::string port_range_string;
+ if (policies->GetString(policy::key::kRemoteAccessHostUdpPortRange,
+ &port_range_string)) {
+ UpdateHostUdpPortRangePolicy(port_range_string);
+ }
+
policy_received_ = true;
if (!pending_connect_.is_null()) {
@@ -386,6 +393,19 @@ void It2MeHost::UpdateClientDomainListPolicy(
required_client_domain_list_ = std::move(client_domain_list);
}
+void It2MeHost::UpdateHostUdpPortRangePolicy(std::string port_range_string) {
+ // TODO(gusss) i copied this; need to figure out what it actually does!
Sergey Ulanov 2017/05/23 20:11:01 It verifies that this function is called on the ri
+ DCHECK(host_context_->network_task_runner()->BelongsToCurrentThread());
+
+ VLOG(2) << "UpdateHostUdpPortRangePolicy: " << port_range_string;
+
+ if (!PortRange::Parse(port_range_string, &udp_port_range_)) {
+ // TODO(gusss) how to handle formatting error in this case?
Sergey Ulanov 2017/05/23 20:11:01 I think we need to stop the host in this case. I t
+ }
+
+ // TODO(gusss) do we have to disconnect?
Sergey Ulanov 2017/05/23 20:11:01 Yes, same as in UpdateClientDomainListPolicy()
+}
+
void It2MeHost::SetState(It2MeHostState state,
const std::string& error_message) {
DCHECK(host_context_->network_task_runner()->BelongsToCurrentThread());
« no previous file with comments | « remoting/host/it2me/it2me_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698