vlist_for_each_element(&interfaces, iface, node)
avl_for_each_element(&entries, s, avl)
- dns_send_question(iface, s->entry, TYPE_PTR);
+ dns_send_question(iface, s->entry, TYPE_PTR, 1);
}
static struct cache_entry*
avl_insert(&entries, &s->avl);
if (!hlen)
- dns_send_question(iface, entry, TYPE_PTR);
+ dns_send_question(iface, entry, TYPE_PTR, !iface->multicast);
return s;
}
}
void
-cache_answer(struct interface *iface, uint8_t *base, int blen, char *name, struct dns_answer *a, uint8_t *rdata)
+cache_answer(struct interface *iface, uint8_t *base, int blen, char *name, struct dns_answer *a, uint8_t *rdata, int flush)
{
struct dns_srv_data *dsd = (struct dns_srv_data *) rdata;
struct cache_record *r;
int host_len = 0;
static char *rdata_buffer = (char *) mdns_buf;
- if (!(a->class & CLASS_IN))
- return;
-
nlen = strlen(name);
switch (a->type) {
return;
}
- DBG(1, "A -> %s %s %s\n", dns_type_string(a->type), name, rdata_buffer);
+ DBG(1, "A -> %s %s %s ttl:%d\n", dns_type_string(a->type), name, rdata_buffer, a->ttl);
rdlength = strlen(rdata_buffer);