Home | History | Annotate | Download | only in src

Lines Matching full:forward

185     /* don't forward simple names, make exception for NS queries and empty name. */
206 HEADER *header, size_t plen, time_t now, struct frec *forward)
218 forward = NULL;
219 else if (forward || (forward = lookup_frec_by_sender(ntohs(header->id), udpaddr, crc)))
222 domain = forward->sentto->domain;
223 forward->sentto->failed_queries++;
226 forward->forwardall = 1;
229 type = forward->sentto->flags & SERV_TYPE;
230 if (!(start = forward->sentto->next))
232 header->id = htons(forward->new_id);
239 if (!flags && !(forward = get_new_frec(now, NULL)))
243 if (forward)
249 forward->source = *udpaddr;
250 forward->dest = *dst_addr;
251 forward->iface = dst_iface;
252 forward->orig_id = ntohs(header->id);
253 forward->new_id = get_id(is_sign, forward->orig_id, crc);
254 forward->fd = udpfd;
255 forward->crc = crc;
256 forward->forwardall = 0;
257 header->id = htons(forward->new_id);
270 forward->forwardall = 1;
281 if (!flags && forward)
306 if (!forward->rfd6 &&
307 !(forward->rfd6 = allocate_rfd(AF_INET6)))
309 daemon->rfd_save = forward->rfd6;
310 fd = forward->rfd6->fd;
315 if (!forward->rfd4 &&
316 !(forward->rfd4 = allocate_rfd(AF_INET)))
318 daemon->rfd_save = forward->rfd4;
319 fd = forward->rfd4->fd;
348 forward->sentto = start;
349 if (!forward->forwardall)
351 forward->forwardall++;
366 header->id = htons(forward->orig_id);
367 free_frec(forward); /* cancel */
465 struct frec *forward;
491 !(forward = lookup_frec(ntohs(header->id), questions_crc(header, n, daemon->namebuff))))
494 server = forward->sentto;
498 forward->forwardall == 0)
516 forward_query(-1, NULL, NULL, 0, header, nn, now, forward);
522 if ((forward->sentto->flags & SERV_TYPE) == 0)
543 /* If the answer is an error, keep the forward record in place in case
547 if (forward->forwardall == 0 || --forward->forwardall == 1 ||
552 header->id = htons(forward->orig_id);
554 send_from(forward->fd, daemon->options & OPT_NOWILD, daemon->packet, nn,
555 &forward->source, &forward->dest, forward->iface);
557 free_frec(forward); /* cancel */
1072 routine degenerates into killing any conflicting forward record. */