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);
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;
}