]> granicus.if.org Git - pdns/commitdiff
Add source IP when logging incorrect (ignored) TCP packets.
authorAndreas Jakum <aj-gh@users.noreply.github.com>
Fri, 13 Nov 2015 15:17:29 +0000 (16:17 +0100)
committerAndreas Jakum <aj-gh@users.noreply.github.com>
Fri, 13 Nov 2015 15:17:29 +0000 (16:17 +0100)
Similar to what is already in place for UDP packets.

pdns/pdns_recursor.cc

index 3d3a3751761e947dc75efaac7ed5df399e32eaa3..21ecf25637090ad6d13973cfc171e57e7ed2b468 100644 (file)
@@ -1009,12 +1009,12 @@ void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var)
       dc->setRemote(&conn->d_remote);
       if(dc->d_mdp.d_header.qr) {
         delete dc;
-        L<<Logger::Error<<"Ignoring answer on server socket!"<<endl;
+        L<<Logger::Error<<"Ignoring answer from TCP client "<< conn->d_remote.toString() <<" on server socket!"<<endl;
         return;
       }
       if(dc->d_mdp.d_header.opcode) {
         delete dc;
-        L<<Logger::Error<<"Ignoring non-query opcode on server socket!"<<endl;
+        L<<Logger::Error<<"Ignoring non-query opcode from TCP client "<< conn->d_remote.toString() <<" on server socket!"<<endl;
         return;
       }
       else {