Home | History | Annotate | Download | only in dns

Lines Matching refs:bad

123 	dns_bcentry_t **newtable, *bad, *next;
187 for (bad = bc->table[i]; bad != NULL; bad = next) {
188 next = bad->next;
189 if (isc_time_compare(&bad->expire, now) < 0) {
190 isc_mem_put(bc->mctx, bad,
191 sizeof(*bad) + bad->name.length);
194 bad->next = newtable[bad->hashval % newsize];
195 newtable[bad->hashval % newsize] = bad;
217 dns_bcentry_t *bad, *prev, *next;
236 for (bad = bc->table[hash]; bad != NULL; bad = next) {
237 next = bad->next;
238 if (bad->type == type && dns_name_equal(name, &bad->name)) {
240 bad->expire = *expire;
241 bad->flags = flags;
245 if (isc_time_compare(&bad->expire, &now) < 0) {
247 bc->table[hash] = bad->next;
249 prev->next = bad->next;
251 isc_mem_put(bc->mctx, bad,
252 sizeof(*bad) + bad->name.length);
255 prev = bad;
259 if (bad == NULL) {
261 bad = isc_mem_get(bc->mctx, sizeof(*bad) + name->length);
262 bad->type = type;
263 bad->hashval = hashval;
264 bad->expire = *expire;
265 bad->flags = flags;
266 isc_buffer_init(&buffer, bad + 1, name->length);
267 dns_name_init(&bad->name, NULL);
268 dns_name_copy(name, &bad->name, &buffer);
269 bad->next = bc->table[hash];
270 bc->table[hash] = bad;
278 bad->expire = *expire;
291 dns_bcentry_t *bad, *prev, *next;
321 for (bad = bc->table[hash]; bad != NULL; bad = next) {
322 next = bad->next;
326 if (isc_time_compare(&bad->expire, now) < 0) {
328 prev->next = bad->next;
330 bc->table[hash] = bad->next;
333 isc_mem_put(bc->mctx, bad,
334 sizeof(*bad) + bad->name.length);
338 if (bad->type == type && dns_name_equal(name, &bad->name)) {
340 *flagp = bad->flags;
345 prev = bad;
355 bad = bc->table[i];
356 if (bad != NULL && isc_time_compare(&bad->expire, now) < 0) {
357 bc->table[i] = bad->next;
358 isc_mem_put(bc->mctx, bad,
359 sizeof(*bad) + bad->name.length);
391 dns_bcentry_t *bad, *prev, *next;
408 for (bad = bc->table[hash]; bad != NULL; bad = next) {
410 next = bad->next;
411 n = isc_time_compare(&bad->expire, &now);
412 if (n < 0 || dns_name_equal(name, &bad->name)) {
414 bc->table[hash] = bad->next;
416 prev->next = bad->next;
419 isc_mem_put(bc->mctx, bad,
420 sizeof(*bad) + bad->name.length);
423 prev = bad;
433 dns_bcentry_t *bad, *prev, *next;
455 for (bad = bc->table[i]; bad != NULL; bad = next) {
456 next = bad->next;
457 n = isc_time_compare(&bad->expire, &now);
458 if (n < 0 || dns_name_issubdomain(&bad->name, name)) {
460 bc->table[i] = bad->next;
462 prev->next = bad->next;
465 isc_mem_put(bc->mctx, bad,
466 sizeof(*bad) + bad->name.length);
469 prev = bad;
481 dns_bcentry_t *bad, *next, *prev;
500 for (bad = bc->table[i]; bad != NULL; bad = next) {
501 next = bad->next;
502 if (isc_time_compare(&bad->expire, &now) < 0) {
504 prev->next = bad->next;
506 bc->table[i] = bad->next;
509 isc_mem_put(bc->mctx, bad,
510 sizeof(*bad) + bad->name.length);
514 prev = bad;
515 dns_name_format(&bad->name, namebuf, sizeof(namebuf));
516 dns_rdatatype_format(bad->type, typebuf,
518 t = isc_time_microdiff(&bad->expire, &now);