diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-03-31 16:57:23 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-03-31 16:57:23 +0200 |
commit | 2bb39ac56e18fed2ef75ec3d7c6f0366bbbef90d (patch) | |
tree | 74054f1b8513650d4c11b8c745833ba1b294b7b6 | |
parent | 805eec7643a4b2a8b8ed521e213ae8189acaba40 (diff) |
Exclude link-local IPv4s from editor host list.
IPv4 has link-local addresses like IPv6 (block 169.254.0.0/16).
Those addresses should not be considered a valid option when selecting
the `remote_host` setting for the debugger.
-rw-r--r-- | editor/editor_settings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 9166db2741..40304b9975 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -962,6 +962,9 @@ void EditorSettings::setup_network() { // link-local IPv6 addresses don't work, skipping them if (ip.begins_with("fe80:0:0:0:")) // fe80::/64 continue; + // Same goes for IPv4 link-local (APIPA) addresses. + if (ip.begins_with("169.254.")) // 169.254.0.0/16 + continue; if (ip == current) lip = current; //so it saves if (hint != "") |