|
|
ac3a84 |
From 11132a6c20b64eb14a3386ff480086b5bae72146 Mon Sep 17 00:00:00 2001
|
|
|
ac3a84 |
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
|
|
ac3a84 |
Date: Fri, 4 Nov 2022 12:06:21 +0900
|
|
|
ac3a84 |
Subject: [PATCH] resolve: enable per-link mDNS setting by default
|
|
|
ac3a84 |
|
|
|
ac3a84 |
Otherwise, if the link is not managed by systemd-networkd, mDNS cannot
|
|
|
ac3a84 |
be enabled without calling `resolvectl` explicitly.
|
|
|
ac3a84 |
|
|
|
ac3a84 |
Fixes #25252.
|
|
|
ac3a84 |
|
|
|
ac3a84 |
(cherry picked from commit e31540196b8fb136a8f197c7a26d851bd0b93329)
|
|
|
ac3a84 |
|
|
|
ac3a84 |
Related: #2138081
|
|
|
ac3a84 |
---
|
|
|
ac3a84 |
src/resolve/resolved-link-bus.c | 2 +-
|
|
|
ac3a84 |
src/resolve/resolved-link.c | 8 ++++----
|
|
|
ac3a84 |
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
ac3a84 |
|
|
|
ac3a84 |
diff --git a/src/resolve/resolved-link-bus.c b/src/resolve/resolved-link-bus.c
|
|
|
ac3a84 |
index 1f7d092112..9b6d14f20c 100644
|
|
|
ac3a84 |
--- a/src/resolve/resolved-link-bus.c
|
|
|
ac3a84 |
+++ b/src/resolve/resolved-link-bus.c
|
|
|
ac3a84 |
@@ -562,7 +562,7 @@ int bus_link_method_set_mdns(sd_bus_message *message, void *userdata, sd_bus_err
|
|
|
ac3a84 |
return r;
|
|
|
ac3a84 |
|
|
|
ac3a84 |
if (isempty(mdns))
|
|
|
ac3a84 |
- mode = RESOLVE_SUPPORT_NO;
|
|
|
ac3a84 |
+ mode = RESOLVE_SUPPORT_YES;
|
|
|
ac3a84 |
else {
|
|
|
ac3a84 |
mode = resolve_support_from_string(mdns);
|
|
|
ac3a84 |
if (mode < 0)
|
|
|
ac3a84 |
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
|
|
|
ac3a84 |
index 86112f3a3b..d41f6f3e54 100644
|
|
|
ac3a84 |
--- a/src/resolve/resolved-link.c
|
|
|
ac3a84 |
+++ b/src/resolve/resolved-link.c
|
|
|
ac3a84 |
@@ -37,7 +37,7 @@ int link_new(Manager *m, Link **ret, int ifindex) {
|
|
|
ac3a84 |
.ifindex = ifindex,
|
|
|
ac3a84 |
.default_route = -1,
|
|
|
ac3a84 |
.llmnr_support = RESOLVE_SUPPORT_YES,
|
|
|
ac3a84 |
- .mdns_support = RESOLVE_SUPPORT_NO,
|
|
|
ac3a84 |
+ .mdns_support = RESOLVE_SUPPORT_YES,
|
|
|
ac3a84 |
.dnssec_mode = _DNSSEC_MODE_INVALID,
|
|
|
ac3a84 |
.dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID,
|
|
|
ac3a84 |
.operstate = IF_OPER_UNKNOWN,
|
|
|
ac3a84 |
@@ -64,7 +64,7 @@ void link_flush_settings(Link *l) {
|
|
|
ac3a84 |
|
|
|
ac3a84 |
l->default_route = -1;
|
|
|
ac3a84 |
l->llmnr_support = RESOLVE_SUPPORT_YES;
|
|
|
ac3a84 |
- l->mdns_support = RESOLVE_SUPPORT_NO;
|
|
|
ac3a84 |
+ l->mdns_support = RESOLVE_SUPPORT_YES;
|
|
|
ac3a84 |
l->dnssec_mode = _DNSSEC_MODE_INVALID;
|
|
|
ac3a84 |
l->dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID;
|
|
|
ac3a84 |
|
|
|
ac3a84 |
@@ -354,7 +354,7 @@ static int link_update_mdns_support(Link *l) {
|
|
|
ac3a84 |
|
|
|
ac3a84 |
assert(l);
|
|
|
ac3a84 |
|
|
|
ac3a84 |
- l->mdns_support = RESOLVE_SUPPORT_NO;
|
|
|
ac3a84 |
+ l->mdns_support = RESOLVE_SUPPORT_YES;
|
|
|
ac3a84 |
|
|
|
ac3a84 |
r = sd_network_link_get_mdns(l->ifindex, &b);
|
|
|
ac3a84 |
if (r == -ENODATA)
|
|
|
ac3a84 |
@@ -1156,7 +1156,7 @@ static bool link_needs_save(Link *l) {
|
|
|
ac3a84 |
return false;
|
|
|
ac3a84 |
|
|
|
ac3a84 |
if (l->llmnr_support != RESOLVE_SUPPORT_YES ||
|
|
|
ac3a84 |
- l->mdns_support != RESOLVE_SUPPORT_NO ||
|
|
|
ac3a84 |
+ l->mdns_support != RESOLVE_SUPPORT_YES ||
|
|
|
ac3a84 |
l->dnssec_mode != _DNSSEC_MODE_INVALID ||
|
|
|
ac3a84 |
l->dns_over_tls_mode != _DNS_OVER_TLS_MODE_INVALID)
|
|
|
ac3a84 |
return true;
|