From 0a8b692482028d277fe1b295e632f7e3b239bbd1 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Wed, 25 Nov 2020 12:03:17 -0800 Subject: [PATCH] fix device binding & possible loopback issue on FreeBSD --- service/OneService.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/OneService.cpp b/service/OneService.cpp index 3f135b17b..7405dc732 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -3027,6 +3027,7 @@ public: if ((ifname[0] == 't') && (ifname[1] == 'a') && (ifname[2] == 'p')) return false; // tap# is probably an OpenVPN tunnel or similar if ((ifname[0] == 'u') && (ifname[1] == 't') && (ifname[2] == 'u') && (ifname[3] == 'n')) return false; // ... as is utun# #endif + #ifdef _WIN32 if ((ifname[0] == 'Z') && (ifname[1] == 'e') && (ifname[2] == 'r') && ifname[3] == 'o' && (ifname[4] == 'T') && (ifname[5] == 'i') && (ifname[6] == 'e') && (ifname[7] == 'r')) { @@ -3034,6 +3035,11 @@ public: } #endif +#ifdef __FreeBSD__ + if ((ifname[0] == 'l') && (ifname[1] == 'o')) return false; // loopback + if ((ifname[0] == 'z') && (ifname[1] == 't')) return false; // sanity check: zt# +#endif + { Mutex::Lock _l(_localConfig_m); for(std::vector::const_iterator p(_interfacePrefixBlacklist.begin());p!=_interfacePrefixBlacklist.end();++p) {