chiark / gitweb /
Add fixme.
[adns] / src / reply.c
index 2317954d9ea8fd779900d59bc990a66f5da3785a..f98540cb7cc8785e131ad8746be615b8e3a149f8 100644 (file)
@@ -41,6 +41,7 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
     adns__diag(ads,serv,0,"received datagram too short for message header (%d)",dglen);
     return;
   }
+  cbyte= 0;
   GET_W(cbyte,id);
   GET_B(cbyte,f1);
   GET_B(cbyte,f2);
@@ -56,8 +57,11 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
   flg_rd= f1&0x01;
   flg_ra= f2&0x80;
   rcode= (f1&0x0f);
+  /* fixme: change this to f2 (which is where rcode really is), BUT
+   * not until we've figured out why the error code is wrong (bad format code 203)
+   */
 
-  if (flg_qr) {
+  if (!flg_qr) {
     adns__diag(ads,serv,0,"server sent us a query, not a response");
     return;
   }