|
Lines 52-57
Link Here
|
| 52 |
static char buf[1024]; |
52 |
static char buf[1024]; |
| 53 |
uint64 numqueries = 0; |
53 |
uint64 numqueries = 0; |
| 54 |
|
54 |
|
|
|
55 |
static unsigned int truncate_len = 512; |
| 55 |
|
56 |
|
| 56 |
static int udp53; |
57 |
static int udp53; |
| 57 |
|
58 |
|
|
Lines 77-83
Link Here
|
| 77 |
{ |
78 |
{ |
| 78 |
if (!u[j].active) return; |
79 |
if (!u[j].active) return; |
| 79 |
response_id(u[j].id); |
80 |
response_id(u[j].id); |
| 80 |
if (response_len > 512) response_tc(); |
81 |
if (response_len > truncate_len) response_tc(); |
| 81 |
socket_send4(udp53,response,response_len,u[j].ip,u[j].port); |
82 |
socket_send4(udp53,response,response_len,u[j].ip,u[j].port); |
| 82 |
log_querydone(&u[j].active,response_len); |
83 |
log_querydone(&u[j].active,response_len); |
| 83 |
u[j].active = 0; --uactive; |
84 |
u[j].active = 0; --uactive; |
|
Lines 430-435
Link Here
|
| 430 |
if (!cache_init(cachesize)) |
431 |
if (!cache_init(cachesize)) |
| 431 |
strerr_die3x(111,FATAL,"not enough memory for cache of size ",x); |
432 |
strerr_die3x(111,FATAL,"not enough memory for cache of size ",x); |
| 432 |
|
433 |
|
|
|
434 |
x = env_get("TRUNCATELEN"); |
| 435 |
if (x) { |
| 436 |
scan_ulong(x,&truncate_len); |
| 437 |
if (truncate_len < 512) |
| 438 |
truncate_len = 512; |
| 439 |
if (truncate_len > 16384) |
| 440 |
truncate_len = 16384; |
| 441 |
} |
| 442 |
|
| 433 |
if (env_get("HIDETTL")) |
443 |
if (env_get("HIDETTL")) |
| 434 |
response_hidettl(); |
444 |
response_hidettl(); |
| 435 |
if (env_get("FORWARDONLY")) |
445 |
if (env_get("FORWARDONLY")) |