interface: use a global socket instead of per-interface ones
[project/mdnsd.git] / cache.c
diff --git a/cache.c b/cache.c
index 0ed52d7f17d0dea94bb80229cc477b91b0a1b029..30e192fd0dbfe7075c2a93b9d4c5df9558c7e434 100644 (file)
--- a/cache.c
+++ b/cache.c
@@ -187,7 +187,7 @@ cache_service(struct interface *iface, char *entry, int hlen, int ttl)
        avl_insert(&services, &s->avl);
 
        if (!hlen)
-               dns_send_question(iface, NULL, entry, TYPE_PTR, iface->multicast);
+               dns_send_question(iface, NULL, entry, TYPE_PTR, interface_multicast(iface));
 
        return s;
 }
@@ -363,7 +363,7 @@ void cache_answer(struct interface *iface, struct sockaddr *from, uint8_t *base,
        r->rdlength = dlen;
        r->time = now;
        r->iface = iface;
-       if (iface->v6)
+       if (interface_ipv6(iface))
                memcpy(&r->from, from, sizeof(struct sockaddr_in6));
        else
                memcpy(&r->from, from, sizeof(struct sockaddr_in));