Commit 553ecf74 authored by Jerry's avatar Jerry

This is a quick fix patch for the issue: AXFR fails half the time because of...

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. 


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2697 e5f2f494-b856-4b98-b285-d166d9295462
parent 8e7486df
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)
......
......@@ -342,10 +342,8 @@ AuthSrvImpl::processAxfrQuery(const IOMessage& io_message, Message& message,
}
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 @@ AuthSrvImpl::processAxfrQuery(const IOMessage& io_message, Message& message,
verbose_mode_);
return (true);
}
xfrout_client_.disconnect();
xfrout_connected_ = false;
return (false);
}
......
......@@ -469,7 +469,7 @@ TEST_F(AuthSrvTest, AXFRSuccess) {
// 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 @@ TEST_F(AuthSrvTest, AXFRConnectFail) {
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 @@ TEST_F(AuthSrvTest, AXFRSendFail) {
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment