pike.git/
lib/
modules/
Protocols.pmod/
DNS.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
1998-06-13
1998-06-13 19:31:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>
6aa4b73c463d026eb7608958ff24525a0b9cfaab (
24
lines) (+
16
/-
8
)
[
Show
|
Annotate
]
Branch:
7.9
Made rec_data() more paranoid.
Rev: lib/modules/Protocols.pmod/DNS.pmod:1.16
525:
static private void rec_data() {
+
mixed err;
+
if (err = catch {
mapping m=udp::read(); if(m->port != 53 || search(nameservers, m->ip) == -1) return; sscanf(m->data,"%2c",int id);
533:
m_delete(requests,id); r->callback(r->domain,decode_res(m->data),@r->args); destruct(r);
+
}) {
+
werror(sprintf("DNS: Failed to read UDP packet. Connection refused?\n"
+
"%s\n",
+
describe_backtrace(err)));
}
-
+
}
static private void generic_get(string d, mapping answer,