diff --git a/osdep/EthernetTap.cpp b/osdep/EthernetTap.cpp index a293991ed..10fe6d895 100644 --- a/osdep/EthernetTap.cpp +++ b/osdep/EthernetTap.cpp @@ -119,4 +119,13 @@ std::shared_ptr EthernetTap::newInstance( EthernetTap::EthernetTap() {} EthernetTap::~EthernetTap() {} +bool EthernetTap::addIps(std::vector ips) +{ + for(std::vector::const_iterator i(ips.begin());i!=ips.end();++i) { + if (!addIp(*i)) + return false; + } + return true; +} + } // namespace ZeroTier diff --git a/osdep/EthernetTap.hpp b/osdep/EthernetTap.hpp index e39b41509..db52e6b43 100644 --- a/osdep/EthernetTap.hpp +++ b/osdep/EthernetTap.hpp @@ -45,7 +45,7 @@ public: virtual void setEnabled(bool en) = 0; virtual bool enabled() const = 0; virtual bool addIp(const InetAddress &ip) = 0; - virtual bool addIps(std::vector ips) = 0; + virtual bool addIps(std::vector ips); // uses addIp() unless overridden virtual bool removeIp(const InetAddress &ip) = 0; virtual std::vector ips() const = 0; virtual void put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len) = 0;