BIND 10 trac991, updated. 69bdbf32c693ddae8b595b45b3ae78582211c553 [991] Use pktinfo to pass control messages on Linux only.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Apr 10 14:14:41 UTC 2013


The branch, trac991 has been updated
       via  69bdbf32c693ddae8b595b45b3ae78582211c553 (commit)
      from  378613249f14406399304f3464f249933108417b (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 69bdbf32c693ddae8b595b45b3ae78582211c553
Author: Marcin Siodelski <marcin at isc.org>
Date:   Wed Apr 10 15:41:24 2013 +0200

    [991] Use pktinfo to pass control messages on Linux only.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dhcp/pkt_filter_inet.cc |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/pkt_filter_inet.cc b/src/lib/dhcp/pkt_filter_inet.cc
index f64c9ed..a6360aa 100644
--- a/src/lib/dhcp/pkt_filter_inet.cc
+++ b/src/lib/dhcp/pkt_filter_inet.cc
@@ -162,7 +162,10 @@ PktFilterInet::receive(const Iface& iface, const SocketInfo& socket_info) {
     pkt->setRemotePort(from_port);
     pkt->setLocalPort(socket_info.port_);
 
-#ifdef IP_PKTINFO
+// In the future the OS-specific code may be abstracted to a different
+// file but for now we keep it here because there is no code yet, which
+// is specific to non-Linux systems.
+#if defined (IP_PKTINFO) && defined (OS_LINUX)
     struct cmsghdr* cmsg;
     struct in_pktinfo* pktinfo;
     struct in_addr to_addr;
@@ -223,7 +226,10 @@ PktFilterInet::send(uint16_t sockfd, const Pkt4Ptr& pkt) {
     m.msg_iov = &v;
     m.msg_iovlen = 1;
 
-#ifdef IP_PKTINFO
+// In the future the OS-specific code may be abstracted to a different
+// file but for now we keep it here because there is no code yet, which
+// is specific to non-Linux systems.
+#if defined (IP_PKTINFO) && defined (OS_LINUX)
     // Setting the interface is a bit more involved.
     //
     // We have to create a "control message", and set that to



More information about the bind10-changes mailing list