interface: use a global socket instead of per-interface ones
[project/mdnsd.git] / ubus.c
diff --git a/ubus.c b/ubus.c
index 8d10eca5cc04cb18a4356ddff6a5c13d5ce8745f..cf75cdcf58ab26f4b0a51846d822c11a8dade020 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -221,8 +221,8 @@ umdns_query(struct ubus_context *ctx, struct ubus_object *obj,
        if ((c = tb[QUERY_TYPE]))
                type = blobmsg_get_u32(c);
 
-       struct interface *iface_v4 = interface_get(ifname, 0, 1);
-       struct interface *iface_v6 = interface_get(ifname, 1, 1);
+       struct interface *iface_v4 = interface_get(ifname, SOCK_MC_IPV4);
+       struct interface *iface_v6 = interface_get(ifname, SOCK_MC_IPV6);
 
        if (!iface_v4 && !iface_v6)
                return UBUS_STATUS_NOT_FOUND;