BIND 10 trac1534, updated. 5758984e174f25954af41dcf07979e2dfca12763 [1534] Try connecting before getsockopt

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Feb 21 11:44:24 UTC 2012


The branch, trac1534 has been updated
       via  5758984e174f25954af41dcf07979e2dfca12763 (commit)
      from  a0f1ca23cd394e0d94845ecc08c35e56bf313b01 (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 5758984e174f25954af41dcf07979e2dfca12763
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Tue Feb 21 12:43:44 2012 +0100

    [1534] Try connecting before getsockopt
    
    Because it complains it is not supported on sockets not connected.

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

Summary of changes:
 src/bin/sockcreator/tests/sockcreator_tests.cc |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/sockcreator/tests/sockcreator_tests.cc b/src/bin/sockcreator/tests/sockcreator_tests.cc
index 9898155..9f55009 100644
--- a/src/bin/sockcreator/tests/sockcreator_tests.cc
+++ b/src/bin/sockcreator/tests/sockcreator_tests.cc
@@ -126,6 +126,14 @@ void addressFamilySpecificCheck(const sockaddr_in6*, const int socknum,
         EXPECT_NE(0, options);
 #endif
 #ifdef IPV6_MTU
+        struct sockaddr_in6 addr;
+        memset(&addr, 0, sizeof(addr));
+        addr.sin6_family = AF_INET6;
+        addr.sin6_port = htons(53);
+        addr.sin6_addr = in6addr_loopback;
+        EXPECT_EQ(0, connect(socknum,
+                             reinterpret_cast<struct sockaddr*>(&addr),
+                             sizeof(addr)));
         // Use minimum MTU on systems that don't have the IPV6_USE_MIN_MTU
         EXPECT_EQ(0, getsockopt(socknum, IPPROTO_IPV6, IPV6_MTU, &options,
                                 &len)) << strerror(errno);



More information about the bind10-changes mailing list