mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +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;
|
return r;
|
||||||
|
|
||||||
if (isempty(mdns))
|
if (isempty(mdns))
|
||||||
mode = RESOLVE_SUPPORT_NO;
|
mode = RESOLVE_SUPPORT_YES;
|
||||||
else {
|
else {
|
||||||
mode = resolve_support_from_string(mdns);
|
mode = resolve_support_from_string(mdns);
|
||||||
if (mode < 0)
|
if (mode < 0)
|
||||||
|
@ -37,7 +37,7 @@ int link_new(Manager *m, Link **ret, int ifindex) {
|
|||||||
.ifindex = ifindex,
|
.ifindex = ifindex,
|
||||||
.default_route = -1,
|
.default_route = -1,
|
||||||
.llmnr_support = RESOLVE_SUPPORT_YES,
|
.llmnr_support = RESOLVE_SUPPORT_YES,
|
||||||
.mdns_support = RESOLVE_SUPPORT_NO,
|
.mdns_support = RESOLVE_SUPPORT_YES,
|
||||||
.dnssec_mode = _DNSSEC_MODE_INVALID,
|
.dnssec_mode = _DNSSEC_MODE_INVALID,
|
||||||
.dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID,
|
.dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID,
|
||||||
.operstate = IF_OPER_UNKNOWN,
|
.operstate = IF_OPER_UNKNOWN,
|
||||||
@ -64,7 +64,7 @@ void link_flush_settings(Link *l) {
|
|||||||
|
|
||||||
l->default_route = -1;
|
l->default_route = -1;
|
||||||
l->llmnr_support = RESOLVE_SUPPORT_YES;
|
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->dnssec_mode = _DNSSEC_MODE_INVALID;
|
||||||
l->dns_over_tls_mode = _DNS_OVER_TLS_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);
|
assert(l);
|
||||||
|
|
||||||
l->mdns_support = RESOLVE_SUPPORT_NO;
|
l->mdns_support = RESOLVE_SUPPORT_YES;
|
||||||
|
|
||||||
r = sd_network_link_get_mdns(l->ifindex, &b);
|
r = sd_network_link_get_mdns(l->ifindex, &b);
|
||||||
if (r == -ENODATA)
|
if (r == -ENODATA)
|
||||||
@ -1148,7 +1148,7 @@ static bool link_needs_save(Link *l) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (l->llmnr_support != RESOLVE_SUPPORT_YES ||
|
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->dnssec_mode != _DNSSEC_MODE_INVALID ||
|
||||||
l->dns_over_tls_mode != _DNS_OVER_TLS_MODE_INVALID)
|
l->dns_over_tls_mode != _DNS_OVER_TLS_MODE_INVALID)
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user