Wire MTU through to service.

This commit is contained in:
Adam Ierymenko 2017-05-04 20:10:49 -07:00
parent d5ed025871
commit e5e90b1f71

View File

@ -2082,16 +2082,17 @@ public:
memcpy(&(n.config),nwc,sizeof(ZT_VirtualNetworkConfig)); memcpy(&(n.config),nwc,sizeof(ZT_VirtualNetworkConfig));
if (n.tap) { // sanity check if (n.tap) { // sanity check
#ifdef __WINDOWS__ #ifdef __WINDOWS__
// wait for up to 5 seconds for the WindowsEthernetTap to actually be initialized // wait for up to 5 seconds for the WindowsEthernetTap to actually be initialized
// //
// without WindowsEthernetTap::isInitialized() returning true, the won't actually // without WindowsEthernetTap::isInitialized() returning true, the won't actually
// be online yet and setting managed routes on it will fail. // be online yet and setting managed routes on it will fail.
const int MAX_SLEEP_COUNT = 500; const int MAX_SLEEP_COUNT = 500;
for (int i = 0; !n.tap->isInitialized() && i < MAX_SLEEP_COUNT; i++) { for (int i = 0; !n.tap->isInitialized() && i < MAX_SLEEP_COUNT; i++) {
Sleep(10); Sleep(10);
} }
#endif #endif
syncManagedStuff(n,true,true); syncManagedStuff(n,true,true);
n.tap->setMtu(nwc->mtu);
} else { } else {
_nets.erase(nwid); _nets.erase(nwid);
return -999; // tap init failed return -999; // tap init failed