avahi_record_list_flush(s->record_list);
}
-
static void reflect_response(AvahiServer *s, AvahiInterface *i, AvahiRecord *r, int flush_cache) {
AvahiInterface *j;
assert(i);
assert(a);
-/* avahi_log_debug("query"); */
-
assert(avahi_record_list_is_empty(s->record_list));
is_probe = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) > 0;
int unicast_response = 0;
if (!(key = avahi_dns_packet_consume_key(p, &unicast_response))) {
- avahi_log_warn("Packet too short (1)");
+ avahi_log_warn(__FILE__": Packet too short or invalid while reading question key. (Maybe an UTF8 problem?)");
goto fail;
}
int unique = 0;
if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
- avahi_log_warn("Packet too short (2)");
+ avahi_log_warn(__FILE__": Packet too short or invalid while reading known answer record. (Maybe an UTF8 problem?)");
goto fail;
}
int unique = 0;
if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
- avahi_log_warn("Packet too short (3)");
+ avahi_log_warn(__FILE__": Packet too short or invalid while reading probe record. (Maybe an UTF8 problem?)");
goto fail;
}
assert(i);
assert(a);
-/* avahi_log_debug("response"); */
-
for (n = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) +
avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ARCOUNT); n > 0; n--) {
AvahiRecord *record;
/* char *txt; */
if (!(record = avahi_dns_packet_consume_record(p, &cache_flush))) {
- avahi_log_warn("Packet too short (4)");
+ avahi_log_warn(__FILE__": Packet too short or invalid while reading response record. (Maybe an UTF8 problem?)");
break;
}
if (!avahi_key_is_pattern(record->key)) {
-/* avahi_log_debug("Handling response: %s", txt = avahi_record_to_string(record)); */
-/* avahi_free(txt); */
-
if (handle_conflict(s, i, record, cache_flush)) {
if (!from_local_iface)
reflect_response(s, i, record, cache_flush);
if (!s->config.enable_reflector)
return;
-/* avahi_log_debug("legacy unicast reflector"); */
-
/* Reflecting legacy unicast queries is a little more complicated
than reflecting normal queries, since we must route the
responses back to the right client. Therefore we must store
return;
}
-/* avahi_log_debug("new packet received on interface '%s.%i'.", i->hardware->name, i->protocol); */
-
if (avahi_address_is_ipv4_in_ipv6(src_address))
/* This is an IPv4 address encapsulated in IPv6, so let's ignore it. */
return;
handle_query_packet(s, p, i, src_address, port, legacy_unicast, from_local_iface);
-/* avahi_log_debug("Handled query"); */
} else {
if (port != AVAHI_MDNS_PORT) {
avahi_log_warn("Recieved repsonse with invalid source port %u on interface '%s.%i'", port, i->hardware->name, i->protocol);
}
handle_response_packet(s, p, i, src_address, from_local_iface);
-/* avahi_log_debug("Handled response"); */
}
}
s->state = state;
+ avahi_interface_monitor_update_rrs(s->monitor, 0);
+
if (s->callback)
s->callback(s, state, s->userdata);
}
if (!s->config.publish_domain)
return;
+ if (avahi_domain_equal(s->domain_name, "local"))
+ return;
+
if (s->browse_domain_entry_group)
assert(avahi_s_entry_group_is_empty(s->browse_domain_entry_group));
else
c->disallow_other_stacks = 0;
c->browse_domains = NULL;
c->disable_publishing = 0;
+ c->allow_point_to_point = 0;
return c;
}