From: Michal 'vorner' Vaner Date: Thu, 23 Feb 2012 11:34:27 +0000 (+0100) Subject: [1534] Remove the failing test X-Git-Tag: trac2351_base~226^2~116^2~166^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f43af5ae2a1a904d1fa091d227f6d5cb1c580fa3;p=thirdparty%2Fkea.git [1534] Remove the failing test Because it's the test which is failing, not the code. Unfortunately, it can't be reliably tested :-(. --- diff --git a/src/bin/sockcreator/tests/sockcreator_tests.cc b/src/bin/sockcreator/tests/sockcreator_tests.cc index 9f550098e7..0f9d881ae5 100644 --- a/src/bin/sockcreator/tests/sockcreator_tests.cc +++ b/src/bin/sockcreator/tests/sockcreator_tests.cc @@ -125,20 +125,12 @@ void addressFamilySpecificCheck(const sockaddr_in6*, const int socknum, &len)) << strerror(errno); 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(&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); - EXPECT_EQ(1280, options); -#endif + // We do not check for the IPV6_MTU, because while setting works (eg. + // the packets are fragmented correctly), the getting does not. If + // we try to getsockopt it, an error complaining it can't be accessed + // on unconnected socket is returned. If we try to connect it, the + // MTU of the interface is returned, not the one we set. So we live + // in belief it works because we examined the packet dump. #if defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DONT) // Turned off Path MTU discovery on IPv6/UDP sockets? EXPECT_EQ(0, getsockopt(socknum, IPPROTO_IPV6, IPV6_MTU_DISCOVER,