Mercurial > dnsbl
comparison src/dnsbl.cpp @ 225:8e1cbf3d96fc stable-6-0-20
simple dns lookup failure need not kill the resolver process
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 29 Dec 2008 18:12:22 -0800 |
parents | da9e7f1c8160 |
children | 3fee608becbc |
comparison
equal
deleted
inserted
replaced
224:fb0aafedb23d | 225:8e1cbf3d96fc |
---|---|
610 #ifdef RESOLVER_DEBUG | 610 #ifdef RESOLVER_DEBUG |
611 char text[1000]; | 611 char text[1000]; |
612 snprintf(text, sizeof(text), "dns_interface() wrote question %s and has answer length %d", question, glom.length); | 612 snprintf(text, sizeof(text), "dns_interface() wrote question %s and has answer length %d", question, glom.length); |
613 my_syslog(text); | 613 my_syslog(text); |
614 #endif | 614 #endif |
615 if ((glom.length == 0) || (glom.length > sizeof(glom.answer))) { | 615 if (glom.length == 0) return 0; |
616 if (glom.length > sizeof(glom.answer)) { | |
616 priv.err = true; | 617 priv.err = true; |
617 return 0; // cannot process overlarge answers | 618 return 0; // cannot process overlarge answers |
618 } | 619 } |
619 priv.my_read(buf, glom.length); | 620 priv.my_read(buf, glom.length); |
620 | 621 |