mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 13:07:55 +00:00
Fixed for Linux tap for GitHub Issue #69
This commit is contained in:
parent
beb7b5bbe5
commit
317995b921
@ -272,7 +272,7 @@ UnixEthernetTap::UnixEthernetTap(
|
|||||||
|
|
||||||
// Set MAC address
|
// Set MAC address
|
||||||
ifr.ifr_ifru.ifru_hwaddr.sa_family = ARPHRD_ETHER;
|
ifr.ifr_ifru.ifru_hwaddr.sa_family = ARPHRD_ETHER;
|
||||||
memcpy(ifr.ifr_ifru.ifru_hwaddr.sa_data,mac.data,6);
|
mac.copyTo(ifr.ifr_ifru.ifru_hwaddr.sa_data,6);
|
||||||
if (ioctl(sock,SIOCSIFHWADDR,(void *)&ifr) < 0) {
|
if (ioctl(sock,SIOCSIFHWADDR,(void *)&ifr) < 0) {
|
||||||
::close(_fd);
|
::close(_fd);
|
||||||
::close(sock);
|
::close(sock);
|
||||||
@ -696,7 +696,7 @@ bool UnixEthernetTap::updateMulticastGroups(std::set<MulticastGroup> &groups)
|
|||||||
++fno;
|
++fno;
|
||||||
}
|
}
|
||||||
if ((devname)&&(!strcmp(devname,_dev.c_str()))&&(mcastmac)&&(Utils::unhex(mcastmac,mac,6) == 6))
|
if ((devname)&&(!strcmp(devname,_dev.c_str()))&&(mcastmac)&&(Utils::unhex(mcastmac,mac,6) == 6))
|
||||||
newGroups.insert(MulticastGroup(MAC(mac),0));
|
newGroups.insert(MulticastGroup(MAC(mac,6),0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::close(fd);
|
::close(fd);
|
||||||
|
Loading…
Reference in New Issue
Block a user