|
Lines 58-63
Link Here
|
| 58 |
static char buf[1024]; |
58 |
static char buf[1024]; |
| 59 |
uint64 numqueries = 0; |
59 |
uint64 numqueries = 0; |
| 60 |
|
60 |
|
|
|
61 |
static unsigned int truncate_len = 512; |
| 61 |
|
62 |
|
| 62 |
static int udp53; |
63 |
static int udp53; |
| 63 |
|
64 |
|
|
Lines 84-90
Link Here
|
| 84 |
{ |
85 |
{ |
| 85 |
if (!u[j].active) return; |
86 |
if (!u[j].active) return; |
| 86 |
response_id(u[j].id); |
87 |
response_id(u[j].id); |
| 87 |
if (response_len > 512) response_tc(); |
88 |
if (response_len > truncate_len) response_tc(); |
| 88 |
socket_send6(udp53,response,response_len,u[j].ip,u[j].port,u[j].scope_id); |
89 |
socket_send6(udp53,response,response_len,u[j].ip,u[j].port,u[j].scope_id); |
| 89 |
log_querydone(&u[j].active,response_len); |
90 |
log_querydone(&u[j].active,response_len); |
| 90 |
u[j].active = 0; --uactive; |
91 |
u[j].active = 0; --uactive; |
|
Lines 449-454
Link Here
|
| 449 |
if (!cache_init(cachesize)) |
450 |
if (!cache_init(cachesize)) |
| 450 |
strerr_die3x(111,FATAL,"not enough memory for cache of size ",x); |
451 |
strerr_die3x(111,FATAL,"not enough memory for cache of size ",x); |
| 451 |
|
452 |
|
|
|
453 |
x = env_get("TRUNCATELEN"); |
| 454 |
if (x) { |
| 455 |
scan_ulong(x,&truncate_len); |
| 456 |
if (truncate_len < 512) |
| 457 |
truncate_len = 512; |
| 458 |
if (truncate_len > 16384) |
| 459 |
truncate_len = 16384; |
| 460 |
} |
| 461 |
|
| 452 |
if (openreadclose("ignoreip",&sa,64) < 0) |
462 |
if (openreadclose("ignoreip",&sa,64) < 0) |
| 453 |
strerr_die2x(111,FATAL,"trouble reading ignoreip"); |
463 |
strerr_die2x(111,FATAL,"trouble reading ignoreip"); |
| 454 |
for(j = k = i = 0; i < sa.len; i++) |
464 |
for(j = k = i = 0; i < sa.len; i++) |