[svn] commit: r1339 - /trunk/src/bin/auth/auth_srv.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Mar 11 22:48:53 UTC 2010


Author: jinmei
Date: Thu Mar 11 22:48:53 2010
New Revision: 1339

Log:
- included dns/exceptions
- ignored responses (orthogonal fix to the first one)

Modified:
    trunk/src/bin/auth/auth_srv.cc

Modified: trunk/src/bin/auth/auth_srv.cc
==============================================================================
--- trunk/src/bin/auth/auth_srv.cc (original)
+++ trunk/src/bin/auth/auth_srv.cc Thu Mar 11 22:48:53 2010
@@ -27,6 +27,7 @@
 #include <exceptions/exceptions.h>
 
 #include <dns/buffer.h>
+#include <dns/exceptions.h>
 #include <dns/messagerenderer.h>
 #include <dns/name.h>
 #include <dns/question.h>
@@ -127,6 +128,15 @@
     //
     // Incoming Message Validation
     //
+
+    // Ignore all requests.
+    if (message.getHeaderFlag(MessageFlag::QR())) {
+        if (verbose_mode) {
+            cerr << "received unexpected response, ignoring" << endl;
+        }
+        return (-1);
+    }
+
     // In this implementation, we only support normal queries
     if (message.getOpcode() != Opcode::QUERY()) {
         if (verbose_mode) {




More information about the bind10-changes mailing list