machine: fix IP detection broadcast setting
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
c4e370fcff
commit
3424f1b3e2
|
@ -439,7 +439,7 @@ class Machine:
|
||||||
# than run another shell command
|
# than run another shell command
|
||||||
src_ip: Optional[str] = None
|
src_ip: Optional[str] = None
|
||||||
# First attempt: use "broadcast" to find the local IP
|
# 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:
|
for (addr, port, bcast) in addr_info:
|
||||||
s = socket.socket(
|
s = socket.socket(
|
||||||
socket.AF_INET, socket.SOCK_DGRAM | socket.SOCK_NONBLOCK
|
socket.AF_INET, socket.SOCK_DGRAM | socket.SOCK_NONBLOCK
|
||||||
|
|
Loading…
Reference in New Issue