mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Do not allow link-local addresses to be used by editor debugger
Default editor debugger address is now 127.0.0.1
(cherry picked from commit 72b4a09a14)
This commit is contained in:
@@ -410,7 +410,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_host") ? get("network/debug_host") : "";
|
||||
int port = has("network/debug_port") ? (int)get("network/debug_port") : 6096;
|
||||
@@ -419,8 +419,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 != "")
|
||||
|
||||
Reference in New Issue
Block a user