mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-09 09:57:26 +03:00
resolve: enable per-link mDNS setting by default
Otherwise, if the link is not managed by systemd-networkd, mDNS cannot be enabled without calling `resolvectl` explicitly. Fixes #25252.
This commit is contained in:
parent
441c62f769
commit
e31540196b
@ -560,7 +560,7 @@ int bus_link_method_set_mdns(sd_bus_message *message, void *userdata, sd_bus_err
|
||||
return r;
|
||||
|
||||
if (isempty(mdns))
|
||||
mode = RESOLVE_SUPPORT_NO;
|
||||
mode = RESOLVE_SUPPORT_YES;
|
||||
else {
|
||||
mode = resolve_support_from_string(mdns);
|
||||
if (mode < 0)
|
||||
|
@ -37,7 +37,7 @@ int link_new(Manager *m, Link **ret, int ifindex) {
|
||||
.ifindex = ifindex,
|
||||
.default_route = -1,
|
||||
.llmnr_support = RESOLVE_SUPPORT_YES,
|
||||
.mdns_support = RESOLVE_SUPPORT_NO,
|
||||
.mdns_support = RESOLVE_SUPPORT_YES,
|
||||
.dnssec_mode = _DNSSEC_MODE_INVALID,
|
||||
.dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID,
|
||||
.operstate = IF_OPER_UNKNOWN,
|
||||
@ -64,7 +64,7 @@ void link_flush_settings(Link *l) {
|
||||
|
||||
l->default_route = -1;
|
||||
l->llmnr_support = RESOLVE_SUPPORT_YES;
|
||||
l->mdns_support = RESOLVE_SUPPORT_NO;
|
||||
l->mdns_support = RESOLVE_SUPPORT_YES;
|
||||
l->dnssec_mode = _DNSSEC_MODE_INVALID;
|
||||
l->dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID;
|
||||
|
||||
@ -360,7 +360,7 @@ static int link_update_mdns_support(Link *l) {
|
||||
|
||||
assert(l);
|
||||
|
||||
l->mdns_support = RESOLVE_SUPPORT_NO;
|
||||
l->mdns_support = RESOLVE_SUPPORT_YES;
|
||||
|
||||
r = sd_network_link_get_mdns(l->ifindex, &b);
|
||||
if (r == -ENODATA)
|
||||
@ -1148,7 +1148,7 @@ static bool link_needs_save(Link *l) {
|
||||
return false;
|
||||
|
||||
if (l->llmnr_support != RESOLVE_SUPPORT_YES ||
|
||||
l->mdns_support != RESOLVE_SUPPORT_NO ||
|
||||
l->mdns_support != RESOLVE_SUPPORT_YES ||
|
||||
l->dnssec_mode != _DNSSEC_MODE_INVALID ||
|
||||
l->dns_over_tls_mode != _DNS_OVER_TLS_MODE_INVALID)
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user