1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
4 #include <netinet/in.h>
5 #include <sys/capability.h>
7 #include "alloc-util.h"
8 #include "bus-common-errors.h"
9 #include "bus-get-properties.h"
10 #include "bus-message-util.h"
11 #include "bus-polkit.h"
13 #include "parse-util.h"
14 #include "resolve-util.h"
15 #include "resolved-bus.h"
16 #include "resolved-link-bus.h"
17 #include "resolved-resolv-conf.h"
18 #include "socket-netlink.h"
19 #include "stdio-util.h"
21 #include "user-util.h"
23 static BUS_DEFINE_PROPERTY_GET(property_get_dnssec_supported
, "b", Link
, link_dnssec_supported
);
24 static BUS_DEFINE_PROPERTY_GET2(property_get_dnssec_mode
, "s", Link
, link_get_dnssec_mode
, dnssec_mode_to_string
);
25 static BUS_DEFINE_PROPERTY_GET2(property_get_llmnr_support
, "s", Link
, link_get_llmnr_support
, resolve_support_to_string
);
26 static BUS_DEFINE_PROPERTY_GET2(property_get_mdns_support
, "s", Link
, link_get_mdns_support
, resolve_support_to_string
);
28 static int property_get_dns_over_tls_mode(
31 const char *interface
,
33 sd_bus_message
*reply
,
35 sd_bus_error
*error
) {
37 Link
*l
= ASSERT_PTR(userdata
);
41 return sd_bus_message_append(reply
, "s", dns_over_tls_mode_to_string(link_get_dns_over_tls_mode(l
)));
44 static int property_get_dns_internal(
47 const char *interface
,
49 sd_bus_message
*reply
,
54 Link
*l
= ASSERT_PTR(userdata
);
59 r
= sd_bus_message_open_container(reply
, 'a', extended
? "(iayqs)" : "(iay)");
63 LIST_FOREACH(servers
, s
, l
->dns_servers
) {
64 r
= bus_dns_server_append(reply
, s
, false, extended
);
69 return sd_bus_message_close_container(reply
);
72 static int property_get_dns(
75 const char *interface
,
77 sd_bus_message
*reply
,
79 sd_bus_error
*error
) {
80 return property_get_dns_internal(bus
, path
, interface
, property
, reply
, userdata
, error
, false);
83 static int property_get_dns_ex(
86 const char *interface
,
88 sd_bus_message
*reply
,
90 sd_bus_error
*error
) {
91 return property_get_dns_internal(bus
, path
, interface
, property
, reply
, userdata
, error
, true);
94 static int property_get_current_dns_server_internal(
97 const char *interface
,
99 sd_bus_message
*reply
,
109 s
= *(DnsServer
**) userdata
;
111 return bus_dns_server_append(reply
, s
, false, extended
);
114 static int property_get_current_dns_server(
117 const char *interface
,
118 const char *property
,
119 sd_bus_message
*reply
,
121 sd_bus_error
*error
) {
122 return property_get_current_dns_server_internal(bus
, path
, interface
, property
, reply
, userdata
, error
, false);
125 static int property_get_current_dns_server_ex(
128 const char *interface
,
129 const char *property
,
130 sd_bus_message
*reply
,
132 sd_bus_error
*error
) {
133 return property_get_current_dns_server_internal(bus
, path
, interface
, property
, reply
, userdata
, error
, true);
136 static int property_get_domains(
139 const char *interface
,
140 const char *property
,
141 sd_bus_message
*reply
,
143 sd_bus_error
*error
) {
145 Link
*l
= ASSERT_PTR(userdata
);
150 r
= sd_bus_message_open_container(reply
, 'a', "(sb)");
154 LIST_FOREACH(domains
, d
, l
->search_domains
) {
155 r
= sd_bus_message_append(reply
, "(sb)", d
->name
, d
->route_only
);
160 return sd_bus_message_close_container(reply
);
163 static int property_get_default_route(
166 const char *interface
,
167 const char *property
,
168 sd_bus_message
*reply
,
170 sd_bus_error
*error
) {
172 Link
*l
= ASSERT_PTR(userdata
);
176 /* Return what is configured, if there's something configured */
177 if (l
->default_route
>= 0)
178 return sd_bus_message_append(reply
, "b", l
->default_route
);
180 /* Otherwise report what is in effect */
181 if (l
->unicast_scope
)
182 return sd_bus_message_append(reply
, "b", dns_scope_is_default_route(l
->unicast_scope
));
184 return sd_bus_message_append(reply
, "b", false);
187 static int property_get_scopes_mask(
190 const char *interface
,
191 const char *property
,
192 sd_bus_message
*reply
,
194 sd_bus_error
*error
) {
196 Link
*l
= ASSERT_PTR(userdata
);
201 mask
= (l
->unicast_scope
? SD_RESOLVED_DNS
: 0) |
202 (l
->llmnr_ipv4_scope
? SD_RESOLVED_LLMNR_IPV4
: 0) |
203 (l
->llmnr_ipv6_scope
? SD_RESOLVED_LLMNR_IPV6
: 0) |
204 (l
->mdns_ipv4_scope
? SD_RESOLVED_MDNS_IPV4
: 0) |
205 (l
->mdns_ipv6_scope
? SD_RESOLVED_MDNS_IPV6
: 0);
207 return sd_bus_message_append(reply
, "t", mask
);
210 static int verify_unmanaged_link(Link
*l
, sd_bus_error
*error
) {
213 if (l
->flags
& IFF_LOOPBACK
)
214 return sd_bus_error_setf(error
, BUS_ERROR_LINK_BUSY
, "Link %s is loopback device.", l
->ifname
);
216 return sd_bus_error_setf(error
, BUS_ERROR_LINK_BUSY
, "Link %s is managed.", l
->ifname
);
221 static int bus_link_method_set_dns_servers_internal(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
, bool extended
) {
222 _cleanup_free_
char *j
= NULL
;
223 struct in_addr_full
**dns
;
224 bool changed
= false;
225 Link
*l
= ASSERT_PTR(userdata
);
231 r
= verify_unmanaged_link(l
, error
);
235 r
= bus_message_read_dns_servers(message
, error
, extended
, &dns
, &n
);
239 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
240 "org.freedesktop.resolve1.set-dns-servers",
241 NULL
, true, UID_INVALID
,
242 &l
->manager
->polkit_registry
, error
);
246 r
= 1; /* Polkit will call us back */
250 for (size_t i
= 0; i
< n
; i
++) {
253 s
= in_addr_full_to_string(dns
[i
]);
259 if (!strextend_with_separator(&j
, ", ", s
)) {
265 bus_client_log(message
, "DNS server change");
267 dns_server_mark_all(l
->dns_servers
);
269 for (size_t i
= 0; i
< n
; i
++) {
272 s
= dns_server_find(l
->dns_servers
, dns
[i
]->family
, &dns
[i
]->address
, dns
[i
]->port
, 0, dns
[i
]->server_name
);
274 dns_server_move_back_and_unmark(s
);
276 r
= dns_server_new(l
->manager
, NULL
, DNS_SERVER_LINK
, l
, dns
[i
]->family
, &dns
[i
]->address
, dns
[i
]->port
, 0, dns
[i
]->server_name
);
278 dns_server_unlink_all(l
->dns_servers
);
287 changed
= dns_server_unlink_marked(l
->dns_servers
) || changed
;
290 link_allocate_scopes(l
);
292 (void) link_save_user(l
);
293 (void) manager_write_resolv_conf(l
->manager
);
294 (void) manager_send_changed(l
->manager
, "DNS");
297 log_link_info(l
, "Bus client set DNS server list to: %s", j
);
299 log_link_info(l
, "Bus client reset DNS server list.");
302 r
= sd_bus_reply_method_return(message
, NULL
);
305 for (size_t i
= 0; i
< n
; i
++)
306 in_addr_full_free(dns
[i
]);
312 int bus_link_method_set_dns_servers(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
313 return bus_link_method_set_dns_servers_internal(message
, userdata
, error
, false);
316 int bus_link_method_set_dns_servers_ex(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
317 return bus_link_method_set_dns_servers_internal(message
, userdata
, error
, true);
320 int bus_link_method_set_domains(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
321 _cleanup_free_
char *j
= NULL
;
322 Link
*l
= ASSERT_PTR(userdata
);
323 bool changed
= false;
328 r
= verify_unmanaged_link(l
, error
);
332 r
= sd_bus_message_enter_container(message
, 'a', "(sb)");
337 _cleanup_free_
char *prefixed
= NULL
;
341 r
= sd_bus_message_read(message
, "(sb)", &name
, &route_only
);
347 r
= dns_name_is_valid(name
);
351 return sd_bus_error_setf(error
, SD_BUS_ERROR_INVALID_ARGS
, "Invalid search domain %s", name
);
352 if (!route_only
&& dns_name_is_root(name
))
353 return sd_bus_error_set(error
, SD_BUS_ERROR_INVALID_ARGS
, "Root domain is not suitable as search domain");
356 prefixed
= strjoin("~", name
);
363 if (!strextend_with_separator(&j
, ", ", name
))
367 r
= sd_bus_message_rewind(message
, false);
371 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
372 "org.freedesktop.resolve1.set-domains",
373 NULL
, true, UID_INVALID
,
374 &l
->manager
->polkit_registry
, error
);
378 return 1; /* Polkit will call us back */
380 bus_client_log(message
, "dns domains change");
382 dns_search_domain_mark_all(l
->search_domains
);
389 r
= sd_bus_message_read(message
, "(sb)", &name
, &route_only
);
395 r
= dns_search_domain_find(l
->search_domains
, name
, &d
);
400 dns_search_domain_move_back_and_unmark(d
);
402 r
= dns_search_domain_new(l
->manager
, &d
, DNS_SEARCH_DOMAIN_LINK
, l
, name
);
409 d
->route_only
= route_only
;
412 r
= sd_bus_message_exit_container(message
);
416 changed
= dns_search_domain_unlink_marked(l
->search_domains
) || changed
;
419 (void) link_save_user(l
);
420 (void) manager_write_resolv_conf(l
->manager
);
423 log_link_info(l
, "Bus client set search domain list to: %s", j
);
425 log_link_info(l
, "Bus client reset search domain list.");
428 return sd_bus_reply_method_return(message
, NULL
);
431 dns_search_domain_unlink_all(l
->search_domains
);
435 int bus_link_method_set_default_route(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
436 Link
*l
= ASSERT_PTR(userdata
);
441 r
= verify_unmanaged_link(l
, error
);
445 r
= sd_bus_message_read(message
, "b", &b
);
449 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
450 "org.freedesktop.resolve1.set-default-route",
451 NULL
, true, UID_INVALID
,
452 &l
->manager
->polkit_registry
, error
);
456 return 1; /* Polkit will call us back */
458 bus_client_log(message
, "dns default route change");
460 if (l
->default_route
!= b
) {
461 l
->default_route
= b
;
463 (void) link_save_user(l
);
464 (void) manager_write_resolv_conf(l
->manager
);
466 log_link_info(l
, "Bus client set default route setting: %s", yes_no(b
));
469 return sd_bus_reply_method_return(message
, NULL
);
472 int bus_link_method_set_llmnr(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
473 Link
*l
= ASSERT_PTR(userdata
);
480 r
= verify_unmanaged_link(l
, error
);
484 r
= sd_bus_message_read(message
, "s", &llmnr
);
489 mode
= RESOLVE_SUPPORT_YES
;
491 mode
= resolve_support_from_string(llmnr
);
493 return sd_bus_error_setf(error
, SD_BUS_ERROR_INVALID_ARGS
, "Invalid LLMNR setting: %s", llmnr
);
496 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
497 "org.freedesktop.resolve1.set-llmnr",
498 NULL
, true, UID_INVALID
,
499 &l
->manager
->polkit_registry
, error
);
503 return 1; /* Polkit will call us back */
505 bus_client_log(message
, "LLMNR change");
507 if (l
->llmnr_support
!= mode
) {
508 l
->llmnr_support
= mode
;
509 link_allocate_scopes(l
);
510 link_add_rrs(l
, false);
512 (void) link_save_user(l
);
514 log_link_info(l
, "Bus client set LLMNR setting: %s", resolve_support_to_string(mode
));
517 return sd_bus_reply_method_return(message
, NULL
);
520 int bus_link_method_set_mdns(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
521 Link
*l
= ASSERT_PTR(userdata
);
528 r
= verify_unmanaged_link(l
, error
);
532 r
= sd_bus_message_read(message
, "s", &mdns
);
537 mode
= RESOLVE_SUPPORT_YES
;
539 mode
= resolve_support_from_string(mdns
);
541 return sd_bus_error_setf(error
, SD_BUS_ERROR_INVALID_ARGS
, "Invalid MulticastDNS setting: %s", mdns
);
544 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
545 "org.freedesktop.resolve1.set-mdns",
546 NULL
, true, UID_INVALID
,
547 &l
->manager
->polkit_registry
, error
);
551 return 1; /* Polkit will call us back */
553 bus_client_log(message
, "mDNS change");
555 if (l
->mdns_support
!= mode
) {
556 l
->mdns_support
= mode
;
557 link_allocate_scopes(l
);
558 link_add_rrs(l
, false);
560 (void) link_save_user(l
);
562 log_link_info(l
, "Bus client set MulticastDNS setting: %s", resolve_support_to_string(mode
));
565 return sd_bus_reply_method_return(message
, NULL
);
568 int bus_link_method_set_dns_over_tls(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
569 Link
*l
= ASSERT_PTR(userdata
);
570 const char *dns_over_tls
;
576 r
= verify_unmanaged_link(l
, error
);
580 r
= sd_bus_message_read(message
, "s", &dns_over_tls
);
584 if (isempty(dns_over_tls
))
585 mode
= _DNS_OVER_TLS_MODE_INVALID
;
587 mode
= dns_over_tls_mode_from_string(dns_over_tls
);
589 return sd_bus_error_setf(error
, SD_BUS_ERROR_INVALID_ARGS
, "Invalid DNSOverTLS setting: %s", dns_over_tls
);
592 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
593 "org.freedesktop.resolve1.set-dns-over-tls",
594 NULL
, true, UID_INVALID
,
595 &l
->manager
->polkit_registry
, error
);
599 return 1; /* Polkit will call us back */
601 bus_client_log(message
, "D-o-T change");
603 if (l
->dns_over_tls_mode
!= mode
) {
604 link_set_dns_over_tls_mode(l
, mode
);
605 link_allocate_scopes(l
);
607 (void) link_save_user(l
);
609 log_link_info(l
, "Bus client set DNSOverTLS setting: %s",
610 mode
< 0 ? "default" : dns_over_tls_mode_to_string(mode
));
613 return sd_bus_reply_method_return(message
, NULL
);
616 int bus_link_method_set_dnssec(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
617 Link
*l
= ASSERT_PTR(userdata
);
624 r
= verify_unmanaged_link(l
, error
);
628 r
= sd_bus_message_read(message
, "s", &dnssec
);
633 mode
= _DNSSEC_MODE_INVALID
;
635 mode
= dnssec_mode_from_string(dnssec
);
637 return sd_bus_error_setf(error
, SD_BUS_ERROR_INVALID_ARGS
, "Invalid DNSSEC setting: %s", dnssec
);
640 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
641 "org.freedesktop.resolve1.set-dnssec",
642 NULL
, true, UID_INVALID
,
643 &l
->manager
->polkit_registry
, error
);
647 return 1; /* Polkit will call us back */
649 bus_client_log(message
, "DNSSEC change");
651 if (l
->dnssec_mode
!= mode
) {
652 link_set_dnssec_mode(l
, mode
);
653 link_allocate_scopes(l
);
655 (void) link_save_user(l
);
657 log_link_info(l
, "Bus client set DNSSEC setting: %s",
658 mode
< 0 ? "default" : dnssec_mode_to_string(mode
));
661 return sd_bus_reply_method_return(message
, NULL
);
664 int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
665 _cleanup_set_free_free_ Set
*ns
= NULL
;
666 _cleanup_strv_free_
char **ntas
= NULL
;
667 _cleanup_free_
char *j
= NULL
;
668 Link
*l
= ASSERT_PTR(userdata
);
673 r
= verify_unmanaged_link(l
, error
);
677 ns
= set_new(&dns_name_hash_ops
);
681 r
= sd_bus_message_read_strv(message
, &ntas
);
685 STRV_FOREACH(i
, ntas
) {
686 r
= dns_name_is_valid(*i
);
690 return sd_bus_error_setf(error
, SD_BUS_ERROR_INVALID_ARGS
,
691 "Invalid negative trust anchor domain: %s", *i
);
693 r
= set_put_strdup(&ns
, *i
);
697 if (!strextend_with_separator(&j
, ", ", *i
))
701 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
702 "org.freedesktop.resolve1.set-dnssec-negative-trust-anchors",
703 NULL
, true, UID_INVALID
,
704 &l
->manager
->polkit_registry
, error
);
708 return 1; /* Polkit will call us back */
710 bus_client_log(message
, "DNSSEC NTA change");
712 if (!set_equal(ns
, l
->dnssec_negative_trust_anchors
)) {
713 set_free_free(l
->dnssec_negative_trust_anchors
);
714 l
->dnssec_negative_trust_anchors
= TAKE_PTR(ns
);
716 (void) link_save_user(l
);
719 log_link_info(l
, "Bus client set NTA list to: %s", j
);
721 log_link_info(l
, "Bus client reset NTA list.");
724 return sd_bus_reply_method_return(message
, NULL
);
727 int bus_link_method_revert(sd_bus_message
*message
, void *userdata
, sd_bus_error
*error
) {
728 Link
*l
= ASSERT_PTR(userdata
);
733 r
= verify_unmanaged_link(l
, error
);
737 r
= bus_verify_polkit_async(message
, CAP_NET_ADMIN
,
738 "org.freedesktop.resolve1.revert",
739 NULL
, true, UID_INVALID
,
740 &l
->manager
->polkit_registry
, error
);
744 return 1; /* Polkit will call us back */
746 bus_client_log(message
, "revert");
748 link_flush_settings(l
);
749 link_allocate_scopes(l
);
750 link_add_rrs(l
, false);
752 (void) link_save_user(l
);
753 (void) manager_write_resolv_conf(l
->manager
);
754 (void) manager_send_changed(l
->manager
, "DNS");
756 return sd_bus_reply_method_return(message
, NULL
);
759 static int link_object_find(sd_bus
*bus
, const char *path
, const char *interface
, void *userdata
, void **found
, sd_bus_error
*error
) {
760 _cleanup_free_
char *e
= NULL
;
761 Manager
*m
= ASSERT_PTR(userdata
);
770 r
= sd_bus_path_decode(path
, "/org/freedesktop/resolve1/link", &e
);
774 ifindex
= parse_ifindex(e
);
778 link
= hashmap_get(m
->links
, INT_TO_PTR(ifindex
));
786 char *link_bus_path(const Link
*link
) {
787 char *p
, ifindex
[DECIMAL_STR_MAX(link
->ifindex
)];
792 xsprintf(ifindex
, "%i", link
->ifindex
);
794 r
= sd_bus_path_encode("/org/freedesktop/resolve1/link", ifindex
, &p
);
801 static int link_node_enumerator(sd_bus
*bus
, const char *path
, void *userdata
, char ***nodes
, sd_bus_error
*error
) {
802 _cleanup_strv_free_
char **l
= NULL
;
803 Manager
*m
= ASSERT_PTR(userdata
);
811 l
= new0(char*, hashmap_size(m
->links
) + 1);
815 HASHMAP_FOREACH(link
, m
->links
) {
818 p
= link_bus_path(link
);
826 *nodes
= TAKE_PTR(l
);
831 static const sd_bus_vtable link_vtable
[] = {
832 SD_BUS_VTABLE_START(0),
834 SD_BUS_PROPERTY("ScopesMask", "t", property_get_scopes_mask
, 0, 0),
835 SD_BUS_PROPERTY("DNS", "a(iay)", property_get_dns
, 0, 0),
836 SD_BUS_PROPERTY("DNSEx", "a(iayqs)", property_get_dns_ex
, 0, 0),
837 SD_BUS_PROPERTY("CurrentDNSServer", "(iay)", property_get_current_dns_server
, offsetof(Link
, current_dns_server
), 0),
838 SD_BUS_PROPERTY("CurrentDNSServerEx", "(iayqs)", property_get_current_dns_server_ex
, offsetof(Link
, current_dns_server
), 0),
839 SD_BUS_PROPERTY("Domains", "a(sb)", property_get_domains
, 0, 0),
840 SD_BUS_PROPERTY("DefaultRoute", "b", property_get_default_route
, 0, 0),
841 SD_BUS_PROPERTY("LLMNR", "s", property_get_llmnr_support
, 0, 0),
842 SD_BUS_PROPERTY("MulticastDNS", "s", property_get_mdns_support
, 0, 0),
843 SD_BUS_PROPERTY("DNSOverTLS", "s", property_get_dns_over_tls_mode
, 0, 0),
844 SD_BUS_PROPERTY("DNSSEC", "s", property_get_dnssec_mode
, 0, 0),
845 SD_BUS_PROPERTY("DNSSECNegativeTrustAnchors", "as", bus_property_get_string_set
, offsetof(Link
, dnssec_negative_trust_anchors
), 0),
846 SD_BUS_PROPERTY("DNSSECSupported", "b", property_get_dnssec_supported
, 0, 0),
848 SD_BUS_METHOD_WITH_ARGS("SetDNS",
849 SD_BUS_ARGS("a(iay)", addresses
),
851 bus_link_method_set_dns_servers
,
852 SD_BUS_VTABLE_UNPRIVILEGED
),
853 SD_BUS_METHOD_WITH_ARGS("SetDNSEx",
854 SD_BUS_ARGS("a(iayqs)", addresses
),
856 bus_link_method_set_dns_servers_ex
,
857 SD_BUS_VTABLE_UNPRIVILEGED
),
858 SD_BUS_METHOD_WITH_ARGS("SetDomains",
859 SD_BUS_ARGS("a(sb)", domains
),
861 bus_link_method_set_domains
,
862 SD_BUS_VTABLE_UNPRIVILEGED
),
863 SD_BUS_METHOD_WITH_ARGS("SetDefaultRoute",
864 SD_BUS_ARGS("b", enable
),
866 bus_link_method_set_default_route
,
867 SD_BUS_VTABLE_UNPRIVILEGED
),
868 SD_BUS_METHOD_WITH_ARGS("SetLLMNR",
869 SD_BUS_ARGS("s", mode
),
871 bus_link_method_set_llmnr
,
872 SD_BUS_VTABLE_UNPRIVILEGED
),
873 SD_BUS_METHOD_WITH_ARGS("SetMulticastDNS",
874 SD_BUS_ARGS("s", mode
),
876 bus_link_method_set_mdns
,
877 SD_BUS_VTABLE_UNPRIVILEGED
),
878 SD_BUS_METHOD_WITH_ARGS("SetDNSOverTLS",
879 SD_BUS_ARGS("s", mode
),
881 bus_link_method_set_dns_over_tls
,
882 SD_BUS_VTABLE_UNPRIVILEGED
),
883 SD_BUS_METHOD_WITH_ARGS("SetDNSSEC",
884 SD_BUS_ARGS("s", mode
),
886 bus_link_method_set_dnssec
,
887 SD_BUS_VTABLE_UNPRIVILEGED
),
888 SD_BUS_METHOD_WITH_ARGS("SetDNSSECNegativeTrustAnchors",
889 SD_BUS_ARGS("as", names
),
891 bus_link_method_set_dnssec_negative_trust_anchors
,
892 SD_BUS_VTABLE_UNPRIVILEGED
),
893 SD_BUS_METHOD_WITH_ARGS("Revert",
896 bus_link_method_revert
,
897 SD_BUS_VTABLE_UNPRIVILEGED
),
902 const BusObjectImplementation link_object
= {
903 "/org/freedesktop/resolve1/link",
904 "org.freedesktop.resolve1.Link",
905 .fallback_vtables
= BUS_FALLBACK_VTABLES({link_vtable
, link_object_find
}),
906 .node_enumerator
= link_node_enumerator
,