chiark / gitweb /
Fix typo in changelog entry for 1.6.1
[adns.git] / src / reply.c
index 0379ca441ff52f90feefdce6cf3dc333c7b808a7..e538674494662a50c65d1295ad9e685a54717c79 100644 (file)
@@ -3,12 +3,8 @@
  * - main handling and parsing routine for received datagrams
  */
 /*
- *  This file is part of adns, which is
- *    Copyright (C) 1997-2000,2003,2006,2014-2016  Ian Jackson
- *    Copyright (C) 2014  Mark Wooding
- *    Copyright (C) 1999-2000,2003,2006  Tony Finch
- *    Copyright (C) 1991 Massachusetts Institute of Technology
- *  (See the file INSTALL for full details.)
+ *  This file is part of adns, which is Copyright Ian Jackson
+ *  and contributors (see the file INSTALL for full details).
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -340,8 +336,8 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
                     &ownermatched);
     assert(!st); assert(rrtype != -1);
     if (rri < restartfrom ||
-       rrclass != DNS_CLASS_IN ||
        rrtype != (qu->answer->type & adns_rrt_typemask) ||
+       rrclass != DNS_CLASS_IN ||
        !ownermatched)
       continue;
     adns__update_expires(qu,ttl,now);
@@ -370,6 +366,11 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
     adns__query_fail(qu,adns_s_invalidresponse);
     return;
   }
+  if (qu->flags & adns_qf_usevc) {
+    adns__diag(ads,serv,qu,"server sent datagram with TC over TCP");
+    adns__query_fail(qu,adns_s_invalidresponse);
+    return;
+  }
   qu->flags |= adns_qf_usevc;
   
  x_restartquery: