pike.git / lib / modules / Protocols.pmod / DNS.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:1419:    next_client->do_query(domain, cl, type, callback, @args);    }       protected private void rec_data(mapping m)    {    mixed err;    if (err = catch {    if(m->port != 53 || !has_value(nameservers, m->ip)) return;    sscanf(m->data,"%2c",int id);    object r=requests[id]; -  if(!r) return; +  if(!r) { +  // Invalid request id. Spoofed answer? +  // FIXME: Consider black- or greylisting the answer. +  return; +  }    m_delete(requests,id);    r->callback(r->domain,decode_res(m->data),@r->args);    destruct(r);    }) {    werror("DNS: Failed to read UDP packet. Connection refused?\n%s\n",    describe_backtrace(err));    }    }       protected private void generic_get(string d,