BIND 10 master, updated. 2133cf13c8ce75c146c1f66179f9c7d9a9228ef8 [master] ChangeLog commit-id updated
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Dec 13 19:29:15 UTC 2013
The branch, master has been updated
via 2133cf13c8ce75c146c1f66179f9c7d9a9228ef8 (commit)
via d8045b5e1580a1d0b89a232fd61c10d25a95e769 (commit)
via 113fef862040f3c52e11071ae363e9016f30df0a (commit)
via e5ee6e7893e6ecad5760759f85eb0650435f8dbf (commit)
via ddfaf375356cb49e1c784ae66c7f223c60537652 (commit)
via ac0abc3cf7c512c87122e0f5ead4f0c2fca04890 (commit)
via 92740b11ed7dc3a757e2082608596e0a3d173b51 (commit)
from 39e902dc727aedf0fe5b949516ee746bad38607e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2133cf13c8ce75c146c1f66179f9c7d9a9228ef8
Author: Tomek Mrugalski <tomasz at isc.org>
Date: Fri Dec 13 20:28:50 2013 +0100
[master] ChangeLog commit-id updated
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 +
doc/guide/bind10-guide.xml | 23 ++--
src/lib/dhcp/iface_mgr.h | 7 +-
src/lib/dhcp/iface_mgr_bsd.cc | 98 +++++++++++++++-
src/lib/dhcp/iface_mgr_linux.cc | 2 +-
src/lib/dhcp/iface_mgr_sun.cc | 104 ++++++++++++++++-
src/lib/dhcp/libdhcp++.dox | 5 +-
src/lib/dhcp/tests/iface_mgr_unittest.cc | 186 +++++++++++++++++++++++++++++-
8 files changed, 404 insertions(+), 27 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 5d52004..2e79148 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+7XX. [func] dclink, tomek
+ libdhcp++: Interface detection implemented for FreeBSD, NetBSD,
+ OpenBSD, Mac OS X and Solaris 11. Thanks to David Carlier for
+ contributing a patch.
+ (Trac #2246, git d8045b5e1580a1d0b89a232fd61c10d25a95e769)
+
717. [bug] marcin
Fixed the bug which incorrectly treated DHCPv4 option codes 224-254 as
standard options, barring them from being used as custom options.
diff --git a/doc/guide/bind10-guide.xml b/doc/guide/bind10-guide.xml
index 16fffa8..87463a4 100644
--- a/doc/guide/bind10-guide.xml
+++ b/doc/guide/bind10-guide.xml
@@ -4484,7 +4484,7 @@ Dhcp4/renew-timer 1000 integer (default)
available from <ulink url="http://www.isc.org/software/dhcp"/>.</simpara>
</listitem>
<listitem>
- <simpara>Interface detection is currently working on Linux
+ <simpara>Raw sockets operation is working on Linux
only. See <xref linkend="iface-detect"/> for details.</simpara>
</listitem>
<listitem>
@@ -5401,10 +5401,6 @@ Dhcp6/renew-timer 1000 integer (default)
<listitem>
<simpara>DNS Update is not supported.</simpara>
</listitem>
- <listitem>
- <simpara>Interface detection is currently working on Linux
- only. See <xref linkend="iface-detect"/> for details.</simpara>
- </listitem>
</itemizedlist>
</section>
@@ -5439,16 +5435,17 @@ Dhcp6/renew-timer 1000 integer (default)
<!-- TODO: point to doxygen docs -->
<section id="iface-detect">
- <title>Interface detection</title>
+ <title>Interface detection and Socket handling</title>
<para>Both the DHCPv4 and DHCPv6 components share network
interface detection routines. Interface detection is
- currently only supported on Linux systems.</para>
-
- <para>For non-Linux systems, there is currently a stub
- implementation provided. The interface manager detects loopback
- interfaces only as their name (lo or lo0) can be easily predicted.
- Please contact the BIND 10 development team if you are interested
- in running DHCP components on systems other than Linux.</para>
+ currently supported on Linux, all BSD family (FreeBSD, NetBSD,
+ OpenBSD), Mac OS X and Solaris 11 systems.</para>
+
+ <para>DHCPv4 requires special raw socket processing to send and receive
+ packets from hosts that do not have IPv4 address assigned yet. Support
+ for this operation is implemented on Linux only, so it is likely that
+ DHCPv4 component will not work in certain cases on systems other than
+ Linux.</para>
</section>
<!--
diff --git a/src/lib/dhcp/iface_mgr.h b/src/lib/dhcp/iface_mgr.h
index 0302e24..e02b9b1 100644
--- a/src/lib/dhcp/iface_mgr.h
+++ b/src/lib/dhcp/iface_mgr.h
@@ -207,9 +207,10 @@ public:
///
/// @note Implementation of this method is OS-dependent as bits have
/// different meaning on each OS.
+ /// We need to make it 64 bits, because Solaris uses 64, not 32 bits.
///
/// @param flags bitmask value returned by OS in interface detection
- void setFlags(uint32_t flags);
+ void setFlags(uint64_t flags);
/// @brief Returns interface index.
///
@@ -363,7 +364,9 @@ public:
/// Interface flags (this value is as is returned by OS,
/// it may mean different things on different OSes).
- uint32_t flags_;
+ /// Solaris based os have unsigned long flags field (64 bits).
+ /// It is usually 32 bits, though.
+ uint64_t flags_;
/// Indicates that IPv4 sockets should (true) or should not (false)
/// be opened on this interface.
diff --git a/src/lib/dhcp/iface_mgr_bsd.cc b/src/lib/dhcp/iface_mgr_bsd.cc
index 2293877..be73bcf 100644
--- a/src/lib/dhcp/iface_mgr_bsd.cc
+++ b/src/lib/dhcp/iface_mgr_bsd.cc
@@ -20,6 +20,12 @@
#include <dhcp/pkt_filter_inet.h>
#include <exceptions/exceptions.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_dl.h>
+#include <net/if.h>
+#include <ifaddrs.h>
+
using namespace std;
using namespace isc;
using namespace isc::asiolink;
@@ -28,11 +34,97 @@ using namespace isc::dhcp;
namespace isc {
namespace dhcp {
+/// This is a BSD specific interface detection method.
void
IfaceMgr::detectIfaces() {
- /// @todo do the actual detection on BSDs. Currently just calling
- /// stub implementation.
- stubDetectIfaces();
+ struct ifaddrs* iflist = 0;// The whole interface list
+ struct ifaddrs* ifptr = 0; // The interface we're processing now
+
+ // Gets list of ifaddrs struct
+ if(getifaddrs(&iflist) != 0) {
+ isc_throw(Unexpected, "Network interfaces detection failed.");
+ }
+
+ typedef map<string, Iface> ifaceLst;
+ ifaceLst::iterator iface_iter;
+ ifaceLst ifaces;
+
+ // First lookup for getting interfaces ...
+ for (ifptr = iflist; ifptr != 0; ifptr = ifptr->ifa_next) {
+ const char * ifname = ifptr->ifa_name;
+ uint ifindex = 0;
+
+ if (!(ifindex = if_nametoindex(ifname))) {
+ // Interface name does not have corresponding index ...
+ freeifaddrs(iflist);
+ isc_throw(Unexpected, "Interface " << ifname << " has no index");
+ }
+
+ if ((iface_iter = ifaces.find(ifname)) != ifaces.end()) {
+ continue;
+ }
+
+ Iface iface(ifname, ifindex);
+ iface.setFlags(ifptr->ifa_flags);
+ ifaces.insert(pair<string, Iface>(ifname, iface));
+ }
+
+ // Second lookup to get MAC and IP addresses
+ for (ifptr = iflist; ifptr != 0; ifptr = ifptr->ifa_next) {
+ if ((iface_iter = ifaces.find(ifptr->ifa_name)) == ifaces.end()) {
+ continue;
+ }
+ // Common byte pointer for following data
+ const uint8_t * ptr = 0;
+ if(ifptr->ifa_addr->sa_family == AF_LINK) {
+ // HWAddr
+ struct sockaddr_dl * ldata =
+ reinterpret_cast<struct sockaddr_dl *>(ifptr->ifa_addr);
+ ptr = reinterpret_cast<uint8_t *>(LLADDR(ldata));
+
+ iface_iter->second.setHWType(ldata->sdl_type);
+ iface_iter->second.setMac(ptr, ldata->sdl_alen);
+ } else if(ifptr->ifa_addr->sa_family == AF_INET6) {
+ // IPv6 Addr
+ struct sockaddr_in6 * adata =
+ reinterpret_cast<struct sockaddr_in6 *>(ifptr->ifa_addr);
+ ptr = reinterpret_cast<uint8_t *>(&adata->sin6_addr);
+
+ IOAddress a = IOAddress::fromBytes(AF_INET6, ptr);
+ iface_iter->second.addAddress(a);
+ } else {
+ // IPv4 Addr
+ struct sockaddr_in * adata =
+ reinterpret_cast<struct sockaddr_in *>(ifptr->ifa_addr);
+ ptr = reinterpret_cast<uint8_t *>(&adata->sin_addr);
+
+ IOAddress a = IOAddress::fromBytes(AF_INET, ptr);
+ iface_iter->second.addAddress(a);
+ }
+ }
+
+ freeifaddrs(iflist);
+
+ // Interfaces registering
+ for(ifaceLst::const_iterator iface_iter = ifaces.begin();
+ iface_iter != ifaces.end(); ++iface_iter) {
+ ifaces_.push_back(iface_iter->second);
+ }
+}
+
+/// @brief sets flag_*_ fields
+///
+/// Like Linux version, os specific flags
+///
+/// @params flags
+void Iface::setFlags(uint64_t flags) {
+ flags_ = flags;
+
+ flag_loopback_ = flags & IFF_LOOPBACK;
+ flag_up_ = flags & IFF_UP;
+ flag_running_ = flags & IFF_RUNNING;
+ flag_multicast_ = flags & IFF_MULTICAST;
+ flag_broadcast_ = flags & IFF_BROADCAST;
}
void IfaceMgr::os_send4(struct msghdr& /*m*/,
diff --git a/src/lib/dhcp/iface_mgr_linux.cc b/src/lib/dhcp/iface_mgr_linux.cc
index f31c353..dddeb52 100644
--- a/src/lib/dhcp/iface_mgr_linux.cc
+++ b/src/lib/dhcp/iface_mgr_linux.cc
@@ -502,7 +502,7 @@ void IfaceMgr::detectIfaces() {
/// on different OSes.
///
/// @param flags flags bitfield read from OS
-void Iface::setFlags(uint32_t flags) {
+void Iface::setFlags(uint64_t flags) {
flags_ = flags;
flag_loopback_ = flags & IFF_LOOPBACK;
diff --git a/src/lib/dhcp/iface_mgr_sun.cc b/src/lib/dhcp/iface_mgr_sun.cc
index 46c4a97..fe2b0b3 100644
--- a/src/lib/dhcp/iface_mgr_sun.cc
+++ b/src/lib/dhcp/iface_mgr_sun.cc
@@ -20,6 +20,12 @@
#include <dhcp/pkt_filter_inet.h>
#include <exceptions/exceptions.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_dl.h>
+#include <net/if.h>
+#include <ifaddrs.h>
+
using namespace std;
using namespace isc;
using namespace isc::asiolink;
@@ -28,11 +34,100 @@ using namespace isc::dhcp;
namespace isc {
namespace dhcp {
+/// This is a Solaris specific interface detection code. It works on Solaris 11
+/// only, as earlier versions did not support getifaddrs() API.
void
IfaceMgr::detectIfaces() {
- /// @todo do the actual detection on Solaris. Currently just calling
- /// stub implementation.
- stubDetectIfaces();
+ struct ifaddrs * iflist = 0, * ifptr = 0;
+
+ // Gets list of ifaddrs struct
+ if(getifaddrs(& iflist) != 0) {
+ isc_throw(Unexpected, "Network interfaces detection failed.");
+ }
+
+ typedef std::map<string, Iface> ifaceLst;
+ ifaceLst::iterator iface_iter;
+ ifaceLst ifaces;
+
+ // First lookup for getting interfaces ...
+ for(ifptr = iflist; ifptr != 0; ifptr = ifptr->ifa_next) {
+ const char * ifname = ifptr->ifa_name;
+ uint ifindex = 0;
+
+ if (!(ifindex = if_nametoindex(ifname))) {
+ // Interface name does not have corresponding index ...
+ freeifaddrs(iflist);
+ isc_throw(Unexpected, "Interface " << ifname << " has no index");
+ }
+
+ iface_iter = ifaces.find(ifname);
+ if (iface_iter != ifaces.end()) {
+ continue;
+ }
+
+ Iface iface(ifname, ifindex);
+ iface.setFlags(ifptr->ifa_flags);
+ ifaces.insert(pair<string, Iface>(ifname, iface));
+ }
+
+ // Second lookup to get MAC and IP addresses
+ for (ifptr = iflist; ifptr != 0; ifptr = ifptr->ifa_next) {
+
+ iface_iter = ifaces.find(ifptr->ifa_name);
+ if (iface_iter == ifaces.end()) {
+ continue;
+ }
+ // Common byte pointer for following data
+ const uint8_t * ptr = 0;
+ if (ifptr->ifa_addr->sa_family == AF_LINK) {
+ // HWAddr
+ struct sockaddr_dl * ldata =
+ reinterpret_cast<struct sockaddr_dl *>(ifptr->ifa_addr);
+ ptr = reinterpret_cast<uint8_t *>(LLADDR(ldata));
+
+ iface_iter->second.setHWType(ldata->sdl_type);
+ iface_iter->second.setMac(ptr, ldata->sdl_alen);
+ } else if (ifptr->ifa_addr->sa_family == AF_INET6) {
+ // IPv6 Addr
+ struct sockaddr_in6 * adata =
+ reinterpret_cast<struct sockaddr_in6 *>(ifptr->ifa_addr);
+ ptr = reinterpret_cast<uint8_t *>(& adata->sin6_addr);
+
+ IOAddress a = IOAddress::fromBytes(AF_INET6, ptr);
+ iface_iter->second.addAddress(a);
+ } else {
+ // IPv4 Addr
+ struct sockaddr_in * adata =
+ reinterpret_cast<struct sockaddr_in *>(ifptr->ifa_addr);
+ ptr = reinterpret_cast<uint8_t *>(& adata->sin_addr);
+
+ IOAddress a = IOAddress::fromBytes(AF_INET, ptr);
+ iface_iter->second.addAddress(a);
+ }
+ }
+
+ freeifaddrs(iflist);
+
+ // Interfaces registering
+ for (ifaceLst::const_iterator iface_iter = ifaces.begin();
+ iface_iter != ifaces.end(); ++iface_iter) {
+ ifaces_.push_back(iface_iter->second);
+ }
+}
+
+/// @brief sets flag_*_ fields
+///
+/// Like Linux version, os specific flags
+///
+/// @params flags
+void Iface::setFlags(uint64_t flags) {
+ flags_ = flags;
+
+ flag_loopback_ = flags & IFF_LOOPBACK;
+ flag_up_ = flags & IFF_UP;
+ flag_running_ = flags & IFF_RUNNING;
+ flag_multicast_ = flags & IFF_MULTICAST;
+ flag_broadcast_ = flags & IFF_BROADCAST;
}
void IfaceMgr::os_send4(struct msghdr& /*m*/,
@@ -40,7 +135,8 @@ void IfaceMgr::os_send4(struct msghdr& /*m*/,
size_t /*control_buf_len*/,
const Pkt4Ptr& /*pkt*/) {
// @todo: Are there any specific actions required before sending IPv4 packet
- // on BSDs? See iface_mgr_linux.cc for working Linux implementation.
+ // on Solaris based systems? See iface_mgr_linux.cc
+ // for working Linux implementation.
}
bool IfaceMgr::os_receive4(struct msghdr& /*m*/, Pkt4Ptr& /*pkt*/) {
diff --git a/src/lib/dhcp/libdhcp++.dox b/src/lib/dhcp/libdhcp++.dox
index 6397a4b..ab4d7eb 100644
--- a/src/lib/dhcp/libdhcp++.dox
+++ b/src/lib/dhcp/libdhcp++.dox
@@ -19,8 +19,9 @@
libdhcp++ is an all-purpose DHCP-manipulation library, written in
C++. It offers packet parsing and assembly, DHCPv4 and DHCPv6
-options parsing and ssembly, interface detection (currently on
-Linux systems only) and socket operations. It is a generic purpose library that
+options parsing and assembly, interface detection (currently on
+Linux, FreeBSD, NetBSD, OpenBSD, Max OS X, and Solaris 11) and socket operations.
+It is a generic purpose library that
can be used by server, client, relay, performance tools and other DHCP-related
tools. For server specific library, see \ref libdhcpsrv. Please do not
add any server-specific code to libdhcp++ and use \ref libdhcpsrv instead.
diff --git a/src/lib/dhcp/tests/iface_mgr_unittest.cc b/src/lib/dhcp/tests/iface_mgr_unittest.cc
index 59421d2..129b9ca 100644
--- a/src/lib/dhcp/tests/iface_mgr_unittest.cc
+++ b/src/lib/dhcp/tests/iface_mgr_unittest.cc
@@ -1713,7 +1713,7 @@ void parse_ifconfig(const std::string& textFile, IfaceMgr::IfaceCollection& ifac
// TODO: temporarily disabled, see ticket #1529
TEST_F(IfaceMgrTest, DISABLED_detectIfaces_linux) {
- NakedIfaceMgr* ifacemgr = new NakedIfaceMgr();
+ scoped_ptr<NakedIfaceMgr> ifacemgr(new NakedIfaceMgr());
IfaceMgr::IfaceCollection& detectedIfaces = ifacemgr->getIfacesLst();
const std::string textFile = "ifconfig.txt";
@@ -1818,11 +1818,193 @@ TEST_F(IfaceMgrTest, DISABLED_detectIfaces_linux) {
FAIL();
}
}
+}
+#endif
- delete ifacemgr;
+#if defined(OS_BSD)
+#include <net/if_dl.h>
+#endif
+
+#include <sys/socket.h>
+#include <net/if.h>
+#include <ifaddrs.h>
+
+/// @brief Checks the index of this interface
+/// @param iface Kea interface structure to be checked
+/// @param ifptr original structure returned by getifaddrs
+/// @return true if index is returned properly
+bool
+checkIfIndex(const Iface & iface,
+ struct ifaddrs *& ifptr) {
+ return (iface.getIndex() == if_nametoindex(ifptr->ifa_name));
+}
+
+/// @brief Checks if the interface has proper flags set
+/// @param iface Kea interface structure to be checked
+/// @param ifptr original structure returned by getifaddrs
+/// @return true if flags are set properly
+bool
+checkIfFlags(const Iface & iface,
+ struct ifaddrs *& ifptr) {
+ bool flag_loopback_ = ifptr->ifa_flags & IFF_LOOPBACK;
+ bool flag_up_ = ifptr->ifa_flags & IFF_UP;
+ bool flag_running_ = ifptr->ifa_flags & IFF_RUNNING;
+ bool flag_multicast_ = ifptr->ifa_flags & IFF_MULTICAST;
+
+ return ((iface.flag_loopback_ == flag_loopback_) &&
+ (iface.flag_up_ == flag_up_) &&
+ (iface.flag_running_ == flag_running_) &&
+ (iface.flag_multicast_ == flag_multicast_));
}
+
+/// @brief Checks if MAC Address/IP Addresses are properly well formed
+/// @param iface Kea interface structure to be checked
+/// @param ifptr original structure returned by getifaddrs
+/// @return true if addresses are returned properly
+bool
+checkIfAddrs(const Iface & iface, struct ifaddrs *& ifptr) {
+ const unsigned char * p = 0;
+#if defined(OS_LINUX)
+ // Workaround for Linux ...
+ if(ifptr->ifa_data != 0) {
+ // We avoid localhost as it has no MAC Address
+ if (!strncmp(iface.getName().c_str(), "lo", 2)) {
+ return (true);
+ }
+
+ struct ifreq ifr;
+ memset(& ifr.ifr_name, 0, sizeof ifr.ifr_name);
+ strncpy(ifr.ifr_name, iface.getName().c_str(), sizeof ifr.ifr_name);
+
+ int s = -1; // Socket descriptor
+
+ if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+ isc_throw(Unexpected, "Cannot create AF_INET socket");
+ }
+
+ if (ioctl(s, SIOCGIFHWADDR, & ifr) < 0) {
+ close(s);
+ isc_throw(Unexpected, "Cannot set SIOCGIFHWADDR flag");
+ }
+
+ const uint8_t * p =
+ reinterpret_cast<uint8_t *>(ifr.ifr_ifru.ifru_hwaddr.sa_data);
+
+ close(s);
+
+ /// @todo: Check MAC address length. For some interfaces it is
+ /// different than 6. Some have 0, while some exotic ones (like
+ /// infiniband) have 20.
+ return (!memcmp(p, iface.getMac(), iface.getMacLen()));
+ }
#endif
+ if(!ifptr->ifa_addr) {
+ return (false);
+ }
+
+ switch(ifptr->ifa_addr->sa_family) {
+#if defined(OS_BSD)
+ case AF_LINK: {
+ // We avoid localhost as it has no MAC Address
+ if (!strncmp(iface.getName().c_str(), "lo", 2)) {
+ return (true);
+ }
+
+ struct sockaddr_dl * hwdata =
+ reinterpret_cast<struct sockaddr_dl *>(ifptr->ifa_addr);
+ p = reinterpret_cast<uint8_t *>(LLADDR(hwdata));
+
+ // Extract MAC address length
+ if (hwdata->sdl_alen != iface.getMacLen()) {
+ return (false);
+ }
+
+ return (!memcmp(p, iface.getMac(), hwdata->sdl_alen));
+ }
+#endif
+ case AF_INET: {
+ struct sockaddr_in * v4data =
+ reinterpret_cast<struct sockaddr_in *>(ifptr->ifa_addr);
+ p = reinterpret_cast<uint8_t *>(& v4data->sin_addr);
+
+ IOAddress addrv4 = IOAddress::fromBytes(AF_INET, p);
+
+ for (Iface::AddressCollection::const_iterator a =
+ iface.getAddresses().begin();
+ a != iface.getAddresses().end(); ++ a) {
+ if(a->isV4() && (*a) == addrv4) {
+ return (true);
+ }
+ }
+
+ return (false);
+ }
+ case AF_INET6: {
+ struct sockaddr_in6 * v6data =
+ reinterpret_cast<struct sockaddr_in6 *>(ifptr->ifa_addr);
+ p = reinterpret_cast<uint8_t *>(& v6data->sin6_addr);
+
+ IOAddress addrv6 = IOAddress::fromBytes(AF_INET6, p);
+
+ for(Iface::AddressCollection::const_iterator a =
+ iface.getAddresses().begin();
+ a != iface.getAddresses().end(); ++ a) {
+ if(a->isV6() && (*a) == addrv6) {
+ return (true);
+ }
+ }
+
+ return (false);
+ }
+ default:
+ return (true);
+ }
+}
+
+TEST_F(IfaceMgrTest, detectIfaces) {
+
+ NakedIfaceMgr* ifacemgr = new NakedIfaceMgr();
+ IfaceMgr::IfaceCollection& detectedIfaces = ifacemgr->getIfacesLst();
+
+ // We are using struct ifaddrs as it is the only good portable one
+ // ifreq and ioctls are far from portabe. For BSD ifreq::ifa_flags field
+ // is only a short which, nowadays, can be negative
+ struct ifaddrs * iflist = 0, * ifptr = 0;
+
+ if(getifaddrs(& iflist) != 0) {
+ isc_throw(Unexpected, "Cannot detect interfaces");
+ }
+
+ for (ifptr = iflist; ifptr != 0; ifptr = ifptr->ifa_next) {
+ for (IfaceMgr::IfaceCollection::const_iterator i = detectedIfaces.begin();
+ i != detectedIfaces.end(); ++ i) {
+ if (!strncmp(ifptr->ifa_name, (*i).getName().c_str(),
+ (*i).getName().size())) {
+
+ // Typically unit-tests try to be silent. But interface detection
+ // is tricky enough to warrant additional prints.
+ std::cout << "Checking interface " << i->getName() << std::endl;
+
+ // Check if interface index is reported properly
+ EXPECT_TRUE(checkIfIndex(*i, ifptr));
+
+ // Check if flags are reported properly
+ EXPECT_TRUE(checkIfFlags(*i, ifptr));
+
+ // Check if addresses are reported properly
+ EXPECT_TRUE(checkIfAddrs(*i, ifptr));
+
+ }
+ }
+ }
+
+ freeifaddrs(iflist);
+ iflist = 0;
+
+ delete ifacemgr;
+}
+
volatile bool callback_ok;
void my_callback(void) {
More information about the bind10-changes
mailing list