resolved-bus.c revision 82bd6dddc4a363a9c3c6f41eb46eb171a80dca27
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek This file is part of systemd.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek Copyright 2014 Lennart Poettering
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek systemd is free software; you can redistribute it and/or modify it
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek under the terms of the GNU Lesser General Public License as published by
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek the Free Software Foundation; either version 2.1 of the License, or
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek (at your option) any later version.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek systemd is distributed in the hope that it will be useful, but
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek WITHOUT ANY WARRANTY; without even the implied warranty of
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek Lesser General Public License for more details.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek You should have received a copy of the GNU Lesser General Public License
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek along with systemd; If not, see <http://www.gnu.org/licenses/>.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmekstatic int reply_query_state(DnsQuery *q) {
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering r = in_addr_to_string(q->request_family, &q->request_address, &ip);
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering return sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek return sd_bus_reply_method_errorf(q->request, SD_BUS_ERROR_TIMEOUT, "Query timed out");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek case DNS_TRANSACTION_ATTEMPTS_MAX_REACHED:
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek return sd_bus_reply_method_errorf(q->request, SD_BUS_ERROR_TIMEOUT, "All attempts to contact name servers or networks failed");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek case DNS_TRANSACTION_INVALID_REPLY:
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4fMichal Schmidt return sd_bus_reply_method_errorf(q->request, BUS_ERROR_INVALID_REPLY, "Received invalid reply");
603938e0a9b5379984d7397e3cf81683c0037a53Lennart Poettering return sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_RESOURCES, "Not enough resources");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek return sd_bus_reply_method_errorf(q->request, BUS_ERROR_ABORTED, "Query aborted");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek if (q->answer_rcode == DNS_RCODE_NXDOMAIN)
eb56eb9b40950f1edcffdb7313f8de4f8572a6d5Michal Schmidt sd_bus_error_setf(&error, _BUS_ERROR_DNS "NXDOMAIN", "'%s' not found", name);
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering const char *rc, *n;
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering char p[3]; /* the rcode is 4 bits long */
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering rc = dns_rcode_to_string(q->answer_rcode);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek sd_bus_error_setf(&error, n, "Could not resolve '%s', server or network returned error %s", name, rc);
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek return sd_bus_reply_method_error(q->request, &error);
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek assert_not_reached("Impossible state");
fff40a51ccbb02e8dec4ff2ee505bc84f75e445cZbigniew Jędrzejewski-Szmekstatic int append_address(sd_bus_message *reply, DnsResourceRecord *rr, int ifindex) {
e0aa3726103448097e5ad7cc6f427e142103a321Zbigniew Jędrzejewski-Szmek r = sd_bus_message_open_container(reply, 'r', "iayi");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek if (rr->key->type == DNS_TYPE_A) {
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_append(reply, "i", AF_INET);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_append_array(reply, 'y', &rr->a.in_addr, sizeof(struct in_addr));
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek } else if (rr->key->type == DNS_TYPE_AAAA) {
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek r = sd_bus_message_append(reply, "i", AF_INET6);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_append_array(reply, 'y', &rr->aaaa.in6_addr, sizeof(struct in6_addr));
29a5ca9baa58e55c4d9e1d008cdd014aa9c3c3e1Lennart Poettering r = sd_bus_message_append(reply, "i", ifindex);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_close_container(reply);
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poetteringstatic void bus_method_resolve_hostname_complete(DnsQuery *q) {
7fd1b19bc9e9f5574f2877936b8ac267c7706947Harald Hoyer _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *cname = NULL, *canonical = NULL;
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek unsigned added = 0, i;
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering if (q->state != DNS_TRANSACTION_SUCCESS) {
5e65c93a433447b15180249166f7b3944c3e6156Zbigniew Jędrzejewski-Szmek r = sd_bus_message_new_method_return(q->request, &reply);
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering r = sd_bus_message_open_container(reply, 'a', "(iayi)");
5e65c93a433447b15180249166f7b3944c3e6156Zbigniew Jędrzejewski-Szmek answer = dns_answer_ref(q->answer);
5e65c93a433447b15180249166f7b3944c3e6156Zbigniew Jędrzejewski-Szmek for (i = 0; i < answer->n_rrs; i++) {
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = dns_question_matches_rr(q->question, answer->rrs[i]);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek /* Hmm, if this is not an address record,
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek maybe it's a cname? If so, remember this */
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = dns_question_matches_cname(q->question, answer->rrs[i]);
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering cname = dns_resource_record_ref(answer->rrs[i]);
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering r = append_address(reply, answer->rrs[i], ifindex);
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering canonical = dns_resource_record_ref(answer->rrs[i]);
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_SUCH_RR, "'%s' does not have any RR of requested type", q->request_hostname);
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering /* This has a cname? Then update the query with the
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = dns_query_cname_redirect(q, cname->cname.name);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_CNAME_LOOP, "CNAME loop on '%s'", q->request_hostname);
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering r = sd_bus_reply_method_errno(q->request, -r, NULL);
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering /* Before we restart the query, let's see if any of
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * the RRs we already got already answers our query */
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek for (i = 0; i < answer->n_rrs; i++) {
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = dns_question_matches_rr(q->question, answer->rrs[i]);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = append_address(reply, answer->rrs[i], ifindex);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek canonical = dns_resource_record_ref(answer->rrs[i]);
ce30c8dcb41dfe9264f79f30c7f51c0e74576638Lennart Poettering /* If we didn't find anything, then let's restart the
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * query, this time with the cname */
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
56f64d95763a799ba4475daf44d8e9f72a1bd474Michal Schmidt r = sd_bus_reply_method_errno(q->request, -r, NULL);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_close_container(reply);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek /* Return the precise spelling and uppercasing reported by the server */
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_append(reply, "s", DNS_RESOURCE_KEY_NAME(canonical->key));
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_send(q->manager->bus, reply, NULL);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek log_error("Failed to send hostname reply: %s", strerror(-r));
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek sd_bus_reply_method_errno(q->request, -r, NULL);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmekstatic int bus_method_resolve_hostname(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering r = sd_bus_message_read(message, "si", &hostname, &family);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek if (!IN_SET(family, AF_INET, AF_INET6, AF_UNSPEC))
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown address family %i", family);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid hostname '%s'", hostname);
e9c1ea9de87d4d508ac38ce87a2fa56e7529a91aJason St. John question = dns_question_new(family == AF_UNSPEC ? 2 : 1);
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek key = dns_resource_key_new(DNS_CLASS_IN, DNS_TYPE_A, hostname);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = dns_question_add(question, key);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek key = dns_resource_key_new(DNS_CLASS_IN, DNS_TYPE_AAAA, hostname);
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek r = dns_question_add(question, key);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = dns_query_new(m, &q, question);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek q->request = sd_bus_message_ref(message);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek q->complete = bus_method_resolve_hostname_complete;
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek r = dns_query_bus_track(q, bus, message);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek sd_bus_error_setf(error, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmekstatic void bus_method_resolve_address_complete(DnsQuery *q) {
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek unsigned added = 0, i;
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering if (q->state != DNS_TRANSACTION_SUCCESS) {
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_new_method_return(q->request, &reply);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_open_container(reply, 'a', "s");
5e65c93a433447b15180249166f7b3944c3e6156Zbigniew Jędrzejewski-Szmek answer = dns_answer_ref(q->answer);
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering r = dns_question_matches_rr(q->question, answer->rrs[i]);
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering r = sd_bus_message_append(reply, "s", answer->rrs[i]->ptr.name);
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek in_addr_to_string(q->request_family, &q->request_address, &ip);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_SUCH_RR, "Address '%s' does not have any RR of requested type", ip);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_close_container(reply);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_send(q->manager->bus, reply, NULL);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek log_error("Failed to send address reply: %s", strerror(-r));
eceb8483e5a02e8e337486b89719a3b99cfcb7ceLennart Poettering sd_bus_reply_method_errno(q->request, -r, NULL);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmekstatic int bus_method_resolve_address(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek _cleanup_free_ char *reverse = NULL;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_read(message, "i", &family);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek if (!IN_SET(family, AF_INET, AF_INET6))
56f64d95763a799ba4475daf44d8e9f72a1bd474Michal Schmidt return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown address family %i", family);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_read_array(message, 'y', &d, &sz);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek if (sz != FAMILY_ADDRESS_SIZE(family))
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid address size");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = sd_bus_message_read(message, "i", &ifindex);
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid interface index");
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek r = dns_name_reverse(family, d, &reverse);
if (!question)
return -ENOMEM;
if (!key)
return -ENOMEM;
r = dns_query_go(q);
dns_query_free(q);
if (r == -ESRCH)
sd_bus_error_setf(error, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
unsigned added = 0, i;
assert(q);
r = reply_query_state(q);
goto finish;
goto finish;
goto finish;
if (q->answer) {
goto finish;
goto finish;
goto finish;
goto finish;
goto finish;
goto finish;
goto finish;
added ++;
if (added <= 0) {
r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_SUCH_RR, "Name '%s' does not have any RR of the requested type", q->request_hostname);
goto finish;
goto finish;
dns_query_free(q);
static int bus_method_resolve_record(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
DnsQuery *q;
const char *name;
assert(m);
if (!question)
return -ENOMEM;
if (!key)
return -ENOMEM;
r = dns_query_go(q);
dns_query_free(q);
if (r == -ESRCH)
sd_bus_error_setf(error, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
SD_BUS_METHOD("ResolveHostname", "si", "a(iayi)s", bus_method_resolve_hostname, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ResolveAddress", "iayi", "as", bus_method_resolve_address, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ResolveRecord", "sqq", "a(qqay)", bus_method_resolve_record, SD_BUS_VTABLE_UNPRIVILEGED),
assert(s);
assert(m);
assert(m);
if (m->bus)
r = sd_event_add_time(m->event, &m->bus_retry_event_source, CLOCK_MONOTONIC, now(CLOCK_MONOTONIC) + 5*USEC_PER_SEC, 0, on_bus_retry, m);
r = sd_bus_add_object_vtable(m->bus, NULL, "/org/freedesktop/resolve1", "org.freedesktop.resolve1.Manager", resolve_vtable, m);