[avahi] [PATCH] Fix Avahi with some Airports

Daniel Barkalow barkalow at iabervon.org
Sun Sep 9 13:50:44 PDT 2012


Here's the patch I'm using. It's not pretty, and it doesn't discard all 
the possible unusable addresses, but it does discard the ones that are 
actually breaking things for me, and the addresses it does discard are (as 
far as I can see) necessarily unusable (by the local host).

	-Daniel
*This .sig left intentionally blank*

diff --git a/avahi-core/server.c b/avahi-core/server.c
index 69a1d02..68ab383 100644
--- a/avahi-core/server.c
+++ b/avahi-core/server.c
@@ -673,6 +673,15 @@ static void handle_response_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInter
             break;
         }
 
+        if (record->key->type == AVAHI_DNS_TYPE_A) {
+            AvahiAddress addr;
+            addr.proto = AVAHI_PROTO_INET;
+            addr.data.ipv4 = record->data.a.address;
+            if (avahi_address_is_link_local(&addr) && 
+                !avahi_interface_address_on_link(i, &addr))
+                goto done_record;
+        }
+
         if (!avahi_key_is_pattern(record->key)) {
 
             if (handle_conflict(s, i, record, cache_flush)) {
@@ -683,6 +692,7 @@ static void handle_response_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInter
             }
         }
 
+    done_record:
         avahi_record_unref(record);
     }
 


More information about the avahi mailing list