Lines Matching defs:bad

117 	dns_bcentry_t **newtable, *bad, *next;
131 for (bad = bc->table[i]; bad != NULL; bad = next) {
132 next = bad->next;
133 if (isc_time_compare(&bad->expire, now) < 0) {
134 isc_mem_put(bc->mctx, bad,
135 sizeof(*bad) + bad->name.length);
138 bad->next = newtable[bad->hashval % newsize];
139 newtable[bad->hashval % newsize] = bad;
159 dns_bcentry_t *bad, *prev, *next;
175 for (bad = bc->table[i]; bad != NULL; bad = next) {
176 next = bad->next;
177 if (bad->type == type && dns_name_equal(name, &bad->name)) {
179 bad->expire = *expire;
180 bad->flags = flags;
184 if (isc_time_compare(&bad->expire, &now) < 0) {
186 bc->table[i] = bad->next;
188 prev->next = bad->next;
189 isc_mem_put(bc->mctx, bad,
190 sizeof(*bad) + bad->name.length);
193 prev = bad;
196 if (bad == NULL) {
198 bad = isc_mem_get(bc->mctx, sizeof(*bad) + name->length);
199 if (bad == NULL)
201 bad->type = type;
202 bad->hashval = hashval;
203 bad->expire = *expire;
204 bad->flags = flags;
205 isc_buffer_init(&buffer, bad + 1, name->length);
206 dns_name_init(&bad->name, NULL);
207 dns_name_copy(name, &bad->name, &buffer);
208 bad->next = bc->table[i];
209 bc->table[i] = bad;
216 bad->expire = *expire;
227 dns_bcentry_t *bad, *prev, *next;
254 for (bad = bc->table[i]; bad != NULL; bad = next) {
255 next = bad->next;
259 if (isc_time_compare(&bad->expire, now) < 0) {
261 prev->next = bad->next;
263 bc->table[i] = bad->next;
265 isc_mem_put(bc->mctx, bad, sizeof(*bad) +
266 bad->name.length);
270 if (bad->type == type && dns_name_equal(name, &bad->name)) {
272 *flagp = bad->flags;
276 prev = bad;
284 bad = bc->table[i];
285 if (bad != NULL && isc_time_compare(&bad->expire, now) < 0) {
286 bc->table[i] = bad->next;
287 isc_mem_put(bc->mctx, bad, sizeof(*bad) + bad->name.length);
315 dns_bcentry_t *bad, *prev, *next;
330 for (bad = bc->table[i]; bad != NULL; bad = next) {
332 next = bad->next;
333 n = isc_time_compare(&bad->expire, &now);
334 if (n < 0 || dns_name_equal(name, &bad->name)) {
336 bc->table[i] = bad->next;
338 prev->next = bad->next;
340 isc_mem_put(bc->mctx, bad, sizeof(*bad) +
341 bad->name.length);
344 prev = bad;
352 dns_bcentry_t *bad, *prev, *next;
369 for (bad = bc->table[i]; bad != NULL; bad = next) {
370 next = bad->next;
371 n = isc_time_compare(&bad->expire, &now);
372 if (n < 0 || dns_name_issubdomain(&bad->name, name)) {
374 bc->table[i] = bad->next;
376 prev->next = bad->next;
378 isc_mem_put(bc->mctx, bad, sizeof(*bad) +
379 bad->name.length);
382 prev = bad;
394 dns_bcentry_t *bad, *next, *prev;
409 for (bad = bc->table[i]; bad != NULL; bad = next) {
410 next = bad->next;
411 if (isc_time_compare(&bad->expire, &now) < 0) {
413 prev->next = bad->next;
415 bc->table[i] = bad->next;
417 isc_mem_put(bc->mctx, bad, sizeof(*bad) +
418 bad->name.length);
422 prev = bad;
423 dns_name_format(&bad->name, namebuf, sizeof(namebuf));
424 dns_rdatatype_format(bad->type, typebuf,
426 t = isc_time_microdiff(&bad->expire, &now);