X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fserver.c;h=86fd4a551e7341af4d3856687a99dfa6453cc7dd;hb=b0f64b072a583f20efa97955f8900ec6d971210d;hp=a149f0fbc68bd68425cd610a9fd9aaac037b476e;hpb=4cee342544b5d31022462ba522eed9959ebbd9dd;p=catta diff --git a/avahi-core/server.c b/avahi-core/server.c index a149f0f..86fd4a5 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -513,12 +513,20 @@ static void reflect_response(AvahiServer *s, AvahiInterface *i, AvahiRecord *r, static void* reflect_cache_walk_callback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, void* userdata) { AvahiServer *s = userdata; + AvahiRecord* r; assert(c); assert(pattern); assert(e); assert(s); + /* Don't reflect cache entry with ipv6 link-local addresses. */ + r = e->record; + if ((r->key->type == AVAHI_DNS_TYPE_AAAA) && + (r->data.aaaa.address.address[0] == 0xFE) && + (r->data.aaaa.address.address[1] == 0x80)) + return NULL; + avahi_record_list_push(s->record_list, e->record, e->cache_flush, 0, 0); return NULL; } @@ -1387,6 +1395,7 @@ AvahiServer *avahi_server_new(const AvahiPoll *poll_api, const AvahiServerConfig s->need_entry_cleanup = 0; s->need_group_cleanup = 0; s->need_browser_cleanup = 0; + s->cleanup_time_event = NULL; s->hinfo_entry_group = NULL; s->browse_domain_entry_group = NULL; s->error = AVAHI_OK; @@ -1486,6 +1495,9 @@ void avahi_server_free(AvahiServer* s) { avahi_wide_area_engine_free(s->wide_area_lookup_engine); avahi_multicast_lookup_engine_free(s->multicast_lookup_engine); + if (s->cleanup_time_event) + avahi_time_event_free(s->cleanup_time_event); + avahi_time_event_queue_free(s->time_event_queue); /* Free watches */ @@ -1587,6 +1599,8 @@ AvahiServerConfig* avahi_server_config_init(AvahiServerConfig *c) { c->publish_aaaa_on_ipv4 = 1; c->publish_a_on_ipv6 = 0; c->n_cache_entries_max = AVAHI_DEFAULT_CACHE_ENTRIES_MAX; + c->ratelimit_interval = 0; + c->ratelimit_burst = 0; return c; }