machine: fix IP detection broadcast setting

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-08-08 19:26:19 -04:00
parent c4e370fcff
commit 3424f1b3e2
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 1 additions and 1 deletions

View File

@ -439,7 +439,7 @@ class Machine:
# than run another shell command
src_ip: Optional[str] = None
# First attempt: use "broadcast" to find the local IP
addr_info = [("<broadcast>", 0, False), ("10.255.255.255", 1, True)]
addr_info = [("<broadcast>", 0, True), ("10.255.255.255", 1, False)]
for (addr, port, bcast) in addr_info:
s = socket.socket(
socket.AF_INET, socket.SOCK_DGRAM | socket.SOCK_NONBLOCK