BIND 10 trac991, updated. 23fa01352842de0a16314734ac061f87c81b662a [991] Eliminated the warning about unused variable.

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Apr 5 18:39:31 UTC 2013


The branch, trac991 has been updated
       via  23fa01352842de0a16314734ac061f87c81b662a (commit)
      from  21ef42e572becd4001baa3fcd509b955e077c656 (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 23fa01352842de0a16314734ac061f87c81b662a
Author: Marcin Siodelski <marcin at isc.org>
Date:   Fri Apr 5 20:38:27 2013 +0200

    [991] Eliminated the warning about unused variable.

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

Summary of changes:
 src/lib/dhcp/pkt_filter_inet.cc |   26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/pkt_filter_inet.cc b/src/lib/dhcp/pkt_filter_inet.cc
index 524a069..9a2c74f 100644
--- a/src/lib/dhcp/pkt_filter_inet.cc
+++ b/src/lib/dhcp/pkt_filter_inet.cc
@@ -28,12 +28,24 @@ PktFilterInet::PktFilterInet()
 {
 }
 
-int
-PktFilterInet::openSocket(const Iface& iface,
-                          const isc::asiolink::IOAddress& addr,
-                          const uint16_t port,
-                          const bool receive_bcast,
-                          const bool send_bcast) {
+// iface is only used when SO_BINDTODEVICE is defined and thus
+// the code section using this variable is compiled.
+#ifdef SO_BINDTODEVICE
+int PktFilterInet::openSocket(const Iface& iface,
+                              const isc::asiolink::IOAddress& addr,
+                              const uint16_t port,
+                              const bool receive_bcast,
+                              const bool send_bcast) {
+
+#else
+int PktFilterInet::openSocket(const Iface&,
+                              const isc::asiolink::IOAddress& addr,
+                              const uint16_t port,
+                              const bool receive_bcast,
+                              const bool send_bcast) {
+
+
+#endif
 
     struct sockaddr_in addr4;
     memset(&addr4, 0, sizeof(sockaddr));
@@ -152,6 +164,7 @@ PktFilterInet::receive(const Iface& iface, const SocketInfo& socket_info) {
 
     memset(&to_addr, 0, sizeof(to_addr));
 
+#ifdef IP_PKTINFO
     cmsg = CMSG_FIRSTHDR(&m);
     while (cmsg != NULL) {
         if ((cmsg->cmsg_level == IPPROTO_IP) &&
@@ -172,6 +185,7 @@ PktFilterInet::receive(const Iface& iface, const SocketInfo& socket_info) {
         }
         cmsg = CMSG_NXTHDR(&m, cmsg);
     }
+#endif
 
     return (pkt);
 }



More information about the bind10-changes mailing list