]> granicus.if.org Git - pdns/commitdiff
improve packet too short error message
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 2 Jan 2015 09:54:08 +0000 (10:54 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 2 Jan 2015 09:54:08 +0000 (10:54 +0100)
pdns/dnspacket.cc

index 1106f7da436123b18ca996401a0faf264765b5ac..b1b06a97e24bb2cc5f0525080d8c22283a8e6c09 100644 (file)
@@ -1,6 +1,6 @@
 /*
     PowerDNS Versatile Database Driven Nameserver
-    Copyright (C) 2001 - 2011  PowerDNS.COM BV
+    Copyright (C) 2001 - 2015  PowerDNS.COM BV
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2 as 
@@ -421,8 +421,8 @@ int DNSPacket::noparse(const char *mesg, int length)
 {
   d_rawpacket.assign(mesg,length); 
   if(length < 12) { 
-    L << Logger::Warning << "Ignoring packet: too short from "
-      << getRemote() << endl;
+    L << Logger::Warning << "Ignoring packet: too short ("<<length<<" < 12) from "
+      << d_remote.toStringWithPort()<< endl;
     return -1;
   }
   d_wantsnsid=false;