Commit cae72440 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

supported authors.bind.

PLEASE add an RR for your name in the answer section!


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/f2f200910@216 e5f2f494-b856-4b98-b285-d166d9295462
parent 7529cf9c
......@@ -87,6 +87,7 @@ process_message(int s) {
struct sockaddr_storage ss;
socklen_t sa_len = sizeof(ss);
struct sockaddr* sa = static_cast<struct sockaddr*>((void*)&ss);
Name authors_name("authors.bind");
if (msg.getBuffer().recvFrom(s, sa, &sa_len) > 0) {
try {
......@@ -107,7 +108,19 @@ process_message(int s) {
RRsetPtr query = msg.getSection(SECTION_QUESTION)[0];
string name = query->getName().toText(true);
if (zones.contains(name)) {
if (query->getName() == authors_name &&
query->getClass() == RRClass::CH,
query->getType() == RRType::TXT) {
msg.setRcode(Message::RCODE_NOERROR);
msg.addRR(SECTION_ANSWER, RR(authors_name, RRClass::CH,
RRType::TXT, TTL(0),
TXT("JINMEI Tatuya")));
// add others name here!!
msg.addRR(SECTION_AUTHORITY, RR(authors_name, RRClass::CH,
RRType::NS, TTL(0),
NS("authors.bind")));
} if (zones.contains(name)) {
msg.setRcode(Message::RCODE_NOERROR);
RRset* nsset = new RRset(query->getName(), RRClass::IN,
RRType::NS, TTL(3600));
......
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