Browse Source

[1516] Add sender details when AUTH_UNSUPPORTED_OPCODE is logged

Mukund Sivaraman 11 years ago
parent
commit
5017a99844
2 changed files with 5 additions and 4 deletions
  1. 3 3
      src/bin/auth/auth_messages.mes
  2. 2 1
      src/bin/auth/auth_srv.cc

+ 3 - 3
src/bin/auth/auth_messages.mes

@@ -383,11 +383,11 @@ This message is also logged when the forwarding is restarted (for instance
 if b10-ddns is restarted and the internal connection needs to be created
 again), in which case it should be followed by AUTH_START_DDNS_FORWARDER.
 
-% AUTH_UNSUPPORTED_OPCODE unsupported opcode: %1
+% AUTH_UNSUPPORTED_OPCODE unsupported opcode %1 received from %2
 This is a debug message, produced when a received DNS packet being
 processed by the authoritative server has been found to contain an
-unsupported opcode. (The opcode is included in the message.) The server
-will return an error code of NOTIMPL to the sender.
+unsupported opcode. (The opcode and sender details are included in the
+message.) The server will return an error code of NOTIMPL to the sender.
 
 % AUTH_XFRIN_CHANNEL_CREATED XFRIN session channel created
 This is a debug message indicating that the authoritative server has

+ 2 - 1
src/bin/auth/auth_srv.cc

@@ -582,8 +582,9 @@ AuthSrv::processMessage(const IOMessage& io_message, Message& message,
                                  Rcode::NOTIMP(), stats_attrs, tsig_context);
             }
         } else if (opcode != Opcode::QUERY()) {
+            const IOEndpoint& remote_ep = io_message.getRemoteEndpoint();
             LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_UNSUPPORTED_OPCODE)
-                      .arg(message.getOpcode().toText());
+                .arg(message.getOpcode().toText()).arg(remote_ep);
             makeErrorMessage(impl_->renderer_, message, buffer,
                              Rcode::NOTIMP(), stats_attrs, tsig_context);
         } else if (message.getRRCount(Message::SECTION_QUESTION) != 1) {