From 59dd71187e7523dbfaf0d1ea33c15a828ed068f1 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 11 Nov 2020 15:14:08 -0500 Subject: [PATCH] Build fix. --- osdep/LinuxEthernetTap.cpp | 3 ++- osdep/LinuxEthernetTap.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/osdep/LinuxEthernetTap.cpp b/osdep/LinuxEthernetTap.cpp index 360147eb1..5804745e3 100644 --- a/osdep/LinuxEthernetTap.cpp +++ b/osdep/LinuxEthernetTap.cpp @@ -80,6 +80,7 @@ LinuxEthernetTap::LinuxEthernetTap( _handler(handler), _arg(arg), _nwid(nwid), + _mac(mac), _homePath(homePath), _mtu(mtu), _fd(0), @@ -432,7 +433,7 @@ void LinuxEthernetTap::threadMain() Thread::sleep(500); ifr.ifr_ifru.ifru_hwaddr.sa_family = ARPHRD_ETHER; - mac.copyTo(ifr.ifr_ifru.ifru_hwaddr.sa_data,6); + _mac.copyTo(ifr.ifr_ifru.ifru_hwaddr.sa_data,6); if (ioctl(sock,SIOCSIFHWADDR,(void *)&ifr) < 0) { ::close(sock); printf("WARNING: ioctl() failed setting up Linux tap device (set MAC)\n"); diff --git a/osdep/LinuxEthernetTap.hpp b/osdep/LinuxEthernetTap.hpp index 0cef1cb9f..68fdf2461 100644 --- a/osdep/LinuxEthernetTap.hpp +++ b/osdep/LinuxEthernetTap.hpp @@ -63,6 +63,7 @@ private: void (*_handler)(void *,void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int); void *_arg; uint64_t _nwid; + MAC _mac; Thread _thread; std::string _homePath; std::string _dev;