diff --git a/osdep/LinuxEthernetTap.cpp b/osdep/LinuxEthernetTap.cpp index 9d3773f0e..e7fe657f2 100644 --- a/osdep/LinuxEthernetTap.cpp +++ b/osdep/LinuxEthernetTap.cpp @@ -220,6 +220,7 @@ static bool ___removeIp(const std::string &_dev,const InetAddress &ip) } } +#ifdef __SYNOLOGY__ bool LinuxEthernetTap::addIpSyn(std::vector ips) { // Here we fill out interface config (ifcfg-dev) to prevent it from being killed @@ -233,14 +234,14 @@ bool LinuxEthernetTap::addIpSyn(std::vector ips) setenv("PATH", "/sbin:/bin:/usr/sbin:/usr/bin", 1); // We must know if there is at least (one) of each protocol version so we // can properly enumerate address/netmask combinations in the ifcfg-dev file - for(int i=0; i 1 ? std::to_string(ip4) : ""; cfg_contents += "\nIPADDR"+numstr4+"="+ips[i].toIpString() @@ -256,7 +257,7 @@ bool LinuxEthernetTap::addIpSyn(std::vector ips) } OSUtils::writeFile(filepath.c_str(), cfg_contents.c_str(), cfg_contents.length()); // Finaly, add IPs - for(int i=0; i ips) } return true; } +#endif // __SYNOLOGY__ bool LinuxEthernetTap::addIp(const InetAddress &ip) { diff --git a/osdep/LinuxEthernetTap.hpp b/osdep/LinuxEthernetTap.hpp index acdff9dd1..7dd7e01d1 100644 --- a/osdep/LinuxEthernetTap.hpp +++ b/osdep/LinuxEthernetTap.hpp @@ -52,7 +52,9 @@ public: void setEnabled(bool en); bool enabled() const; bool addIp(const InetAddress &ip); +#ifdef __SYNOLOGY__ bool addIpSyn(std::vector ips); +#endif bool removeIp(const InetAddress &ip); std::vector ips() const; void put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len);