mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Leave feth devices over feth10000 alone.
This commit is contained in:
parent
5bc64c4c4e
commit
a973a6e10e
1 changed files with 3 additions and 1 deletions
|
@ -110,7 +110,9 @@ MacEthernetTap::MacEthernetTap(
|
||||||
if (!getifaddrs(&ifa)) {
|
if (!getifaddrs(&ifa)) {
|
||||||
struct ifaddrs *p = ifa;
|
struct ifaddrs *p = ifa;
|
||||||
while (p) {
|
while (p) {
|
||||||
if ((!strncmp(p->ifa_name,"feth",4))&&(strlen(p->ifa_name) >= 7)&&(deleted.count(std::string(p->ifa_name)) == 0)) {
|
int nameLen = (int)strlen(p->ifa_name);
|
||||||
|
// Delete feth# from feth0 to feth9999, but don't touch >10000.
|
||||||
|
if ((!strncmp(p->ifa_name,"feth",4))&&(nameLen >= 5)&&(nameLen < 9)&&(deleted.count(std::string(p->ifa_name)) == 0)) {
|
||||||
deleted.insert(std::string(p->ifa_name));
|
deleted.insert(std::string(p->ifa_name));
|
||||||
const char *args[4];
|
const char *args[4];
|
||||||
args[0] = "/sbin/ifconfig";
|
args[0] = "/sbin/ifconfig";
|
||||||
|
|
Loading…
Add table
Reference in a new issue