Potential fix for routing issue on Windows

Move setting _initialized = true until after WindowsEthernetTap::threadMain() has actually created and brought up the adapter.  Also in OneService::nodeVirtualNetworkConfigFunction(), wait up to 5 seconds for WindowsEthernatTap::isInitialized() to return true before attempting to configure the interface and managed routes.  Without this, the adapter doesnt actually exist yet when trying to add routes
This commit is contained in:
Grant Limberg 2017-01-05 11:43:26 -08:00
parent aaf69d1aff
commit e2b1a7157e
3 changed files with 20 additions and 1 deletions

View file

@ -110,12 +110,17 @@ public:
void threadMain()
throw();
bool isInitialized() const { return _initialized; };
private:
NET_IFINDEX _getDeviceIndex(); // throws on failure
std::vector<std::string> _getRegistryIPv4Value(const char *regKey);
void _setRegistryIPv4Value(const char *regKey,const std::vector<std::string> &value);
void _syncIps();
// clean up invalid values put into the windows registry
// void _cleanRegistry();
void (*_handler)(void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int);
void *_arg;
MAC _mac;