[svn] commit: r2697 - in /trunk: ChangeLog src/bin/auth/auth_srv.cc src/bin/auth/tests/auth_srv_unittest.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Aug 11 06:37:18 UTC 2010
Author: chenzhengzhang
Date: Wed Aug 11 06:37:17 2010
New Revision: 2697
Log:
This is a quick fix patch for the issue: AXFR fails half the time because of connection problems. xfrout client will make a new connection every time.
Modified:
trunk/ChangeLog
trunk/src/bin/auth/auth_srv.cc
trunk/src/bin/auth/tests/auth_srv_unittest.cc
Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Wed Aug 11 06:37:17 2010
@@ -1,3 +1,8 @@
+ 84. [bug] jinmei, jerry
+ This is a quick fix patch for the issue: AXFR fails half the
+ time because of connection problems. xfrout client will make
+ a new connection every time. (svn r2697)
+
83. [build]*
The configure --with-boost-lib option is removed. It was not
used since the build included ASIO. (svn r2684)
Modified: trunk/src/bin/auth/auth_srv.cc
==============================================================================
--- trunk/src/bin/auth/auth_srv.cc (original)
+++ trunk/src/bin/auth/auth_srv.cc Wed Aug 11 06:37:17 2010
@@ -342,10 +342,8 @@
}
try {
- if (!xfrout_connected_) {
- xfrout_client_.connect();
- xfrout_connected_ = true;
- }
+ xfrout_client_.connect();
+ xfrout_connected_ = true;
xfrout_client_.sendXfroutRequestInfo(
io_message.getSocket().getNative(),
io_message.getData(),
@@ -368,6 +366,10 @@
verbose_mode_);
return (true);
}
+
+ xfrout_client_.disconnect();
+ xfrout_connected_ = false;
+
return (false);
}
Modified: trunk/src/bin/auth/tests/auth_srv_unittest.cc
==============================================================================
--- trunk/src/bin/auth/tests/auth_srv_unittest.cc (original)
+++ trunk/src/bin/auth/tests/auth_srv_unittest.cc Wed Aug 11 06:37:17 2010
@@ -469,7 +469,7 @@
// so we shouldn't have to respond.
EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
response_renderer));
- EXPECT_TRUE(xfrout.isConnected());
+ EXPECT_FALSE(xfrout.isConnected());
}
TEST_F(AuthSrvTest, AXFRConnectFail) {
@@ -481,6 +481,8 @@
response_renderer));
headerCheck(parse_message, default_qid, Rcode::SERVFAIL(),
opcode.getCode(), QR_FLAG, 1, 0, 0, 0);
+ // For a shot term workaround with xfrout we currently close the connection
+ // for each AXFR attempt
EXPECT_FALSE(xfrout.isConnected());
}
@@ -490,7 +492,7 @@
createRequestPacket(opcode, Name("example.com"), RRClass::IN(),
RRType::AXFR(), IPPROTO_TCP);
server.processMessage(*io_message, parse_message, response_renderer);
- EXPECT_TRUE(xfrout.isConnected());
+ EXPECT_FALSE(xfrout.isConnected()); // see above
xfrout.disableSend();
parse_message.clear(Message::PARSE);
More information about the bind10-changes
mailing list