From f80ec871f6f4c63a28b9b8192477114b7aac696d Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 27 Jan 2014 23:13:36 -0800 Subject: Make EthernetTap creation occur in a background thread in Network since it's a time consuming operation on Windows. This fixes one of the last remaining Windows problems. --- node/Switch.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'node/Switch.cpp') diff --git a/node/Switch.cpp b/node/Switch.cpp index 5473402d..cf3580df 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -86,12 +86,11 @@ void Switch::onLocalEthernet(const SharedPtr &network,const MAC &from,c if (!nconf) return; - if (to == network->tap().mac()) { - LOG("%s: frame received from self, ignoring (bridge loop? OS bug?)",network->tap().deviceName().c_str()); + if (to == network->mac()) { + LOG("%s: frame received from self, ignoring (bridge loop? OS bug?)",network->tapDeviceName().c_str()); return; } - - if (from != network->tap().mac()) { + if (from != network->mac()) { LOG("ignored tap: %s -> %s %s (bridging not supported)",from.toString().c_str(),to.toString().c_str(),etherTypeName(etherType)); return; } -- cgit v1.2.3