Branch: Tag:

2010-11-19

2010-11-19 15:05:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added note about possibly spoofed answers.

1426:    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);