aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli2017-09-18 00:48:16 +0200
committerFabio Alessandrelli2017-09-18 00:48:16 +0200
commit72b4a09a1402cb3807f1c3454ed5274dff67d0ae (patch)
tree7218d974ad1bfb82c014a9a711bcf4636af5218e
parentbc005a57d38137b062e0ccc26467353f53556930 (diff)
downloadgodot-72b4a09a1402cb3807f1c3454ed5274dff67d0ae.tar.gz
godot-72b4a09a1402cb3807f1c3454ed5274dff67d0ae.tar.zst
godot-72b4a09a1402cb3807f1c3454ed5274dff67d0ae.zip
Do not allow link-local addresses to be used by editor debugger
Default editor debugger address is now 127.0.0.1
Diffstat (limited to '')
-rw-r--r--editor/editor_settings.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index d4ee6b2d1..11b9f9964 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -460,7 +460,7 @@ void EditorSettings::setup_network() {
List<IP_Address> local_ip;
IP::get_singleton()->get_local_addresses(&local_ip);
- String lip;
+ String lip = "127.0.0.1";
String hint;
String current = has("network/debug/remote_host") ? get("network/debug/remote_host") : "";
int port = has("network/debug/remote_port") ? (int)get("network/debug/remote_port") : 6007;
@@ -469,8 +469,9 @@ void EditorSettings::setup_network() {
String ip = E->get();
- if (lip == "")
- lip = ip;
+ // link-local IPv6 addresses don't work, skipping them
+ if (ip.begins_with("fe80:0:0:0:")) // fe80::/64
+ continue;
if (ip == current)
lip = current; //so it saves
if (hint != "")