From b0f64b072a583f20efa97955f8900ec6d971210d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois-Xavier=20Bourlet?= Date: Tue, 21 Dec 2010 17:32:35 +0100 Subject: [PATCH] reflector: cache entry link-local addresses filter Do not reflect cache entry with ipv6 link-local addresses on query. --- avahi-core/server.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/avahi-core/server.c b/avahi-core/server.c index 2b8f95f..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; } -- 2.39.5