mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-22 09:08:45 +00:00
Give up to a second for the interface to appear to assign IP addresses
This commit is contained in:
@ -850,6 +850,10 @@ void LinuxNetLink::addAddress(const InetAddress &addr, const char *iface)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int interface_index = _indexForInterface(iface);
|
int interface_index = _indexForInterface(iface);
|
||||||
|
for (int reps = 0; interface_index == -1 && reps < 10; ++reps) {
|
||||||
|
Thread::sleep(100);
|
||||||
|
interface_index == _indexForInterface(iface);
|
||||||
|
}
|
||||||
|
|
||||||
if (interface_index == -1) {
|
if (interface_index == -1) {
|
||||||
fprintf(stderr, "Unable to find index for interface %s\n", iface);
|
fprintf(stderr, "Unable to find index for interface %s\n", iface);
|
||||||
|
Reference in New Issue
Block a user