Commit d46b56ad authored by Han Feng's avatar Han Feng
Browse files

update the logic for ixfr that if error happen, we will ignore all the message

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac221@2221 e5f2f494-b856-4b98-b285-d166d9295462
parent 2e4f58b9
...@@ -387,10 +387,8 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, Message& message, ...@@ -387,10 +387,8 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, Message& message,
cerr << "[b10-auth] Error in connection with xfrin module: " << err.what() cerr << "[b10-auth] Error in connection with xfrin module: " << err.what()
<< endl; << endl;
} }
makeErrorMessage(message, response_renderer, Rcode::SERVFAIL(),
verbose_mode_);
is_xfrin_session_established_ = false; is_xfrin_session_established_ = false;
return (true); return (false);
} }
} }
...@@ -415,16 +413,12 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, Message& message, ...@@ -415,16 +413,12 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, Message& message,
cerr << "[b10-auth] Send message to xfrin module failed: " << err.what() cerr << "[b10-auth] Send message to xfrin module failed: " << err.what()
<< endl; << endl;
} }
makeErrorMessage(message, response_renderer, Rcode::SERVFAIL(), return (false);
verbose_mode_);
return (true);
} catch ( CCSessionError &err) { } catch ( CCSessionError &err) {
if (verbose_mode_) { if (verbose_mode_) {
cerr << "[b10-auth] Receive wrong response from xfrin module: " << err.what() << endl; cerr << "[b10-auth] Receive wrong response from xfrin module: " << err.what() << endl;
makeErrorMessage(message, response_renderer, Rcode::SERVFAIL(),
verbose_mode_);
} }
return (true); return (false);
} }
message.makeResponse(); message.makeResponse();
......
...@@ -248,10 +248,10 @@ TEST_F(AuthSrvTest, ednsBadVers) { ...@@ -248,10 +248,10 @@ TEST_F(AuthSrvTest, ednsBadVers) {
TEST_F(AuthSrvTest, notifyInTest) { TEST_F(AuthSrvTest, notifyInTest) {
createDataFromFile("notifyin_fromwire"); createDataFromFile("notifyin_fromwire");
parse_message.clear(Message::PARSE); parse_message.clear(Message::PARSE);
EXPECT_EQ(true, server.processMessage(*io_message, parse_message, EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
response_renderer)); response_renderer));
headerCheck(parse_message, default_qid, Rcode::NOERROR(), Opcode::NOTIFY().getCode(), QR_FLAG, //headerCheck(parse_message, default_qid, Rcode::SERVFAIL(), Opcode::NOTIFY().getCode(), QR_FLAG,
1, 0, 0, 0); // 1, 0, 0, 0);
} }
......
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