CL_CONFIG_PRIO_PKT_LEN,
CL_CONFIG_INTERFACES,
CL_CONFIG_DEVICES,
+ CL_CONFIG_ALIASES,
__CL_CONFIG_MAX
};
[CL_CONFIG_PRIO_PKT_LEN] = { "prio_max_avg_pkt_len", BLOBMSG_TYPE_INT32 },
[CL_CONFIG_INTERFACES] = { "interfaces", BLOBMSG_TYPE_TABLE },
[CL_CONFIG_DEVICES] = { "devices", BLOBMSG_TYPE_TABLE },
+ [CL_CONFIG_ALIASES] = { "aliases", BLOBMSG_TYPE_TABLE },
};
static int __set_dscp(struct qosify_dscp_val *dest, struct blob_attr *attr, bool reset)
if (reset)
qosify_map_reset_config();
+ if ((cur = tb[CL_CONFIG_ALIASES]) != NULL || reset)
+ qosify_map_set_aliases(cur);
+
if ((cur = tb[CL_CONFIG_TIMEOUT]) != NULL)
qosify_map_timeout = blobmsg_get_u32(cur);
.n_methods = ARRAY_SIZE(qosify_methods),
};
-static int
-qosify_dnsmasq_cb(struct ubus_context *ctx, struct ubus_object *obj,
- struct ubus_request_data *req, const char *method,
- struct blob_attr *msg)
-{
- if (!strcmp(method, "dns_result"))
- __qosify_ubus_add_dns_host(msg);
-
- return 0;
-}
-
static void
qosify_subscribe_dnsmasq(struct ubus_context *ctx)
{
static struct ubus_subscriber sub = {
- .cb = qosify_dnsmasq_cb,
+ .cb = qosify_ubus_add_dns_host,
};
uint32_t id;