summaryrefslogtreecommitdiff
path: root/src/resolve/resolvectl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolvectl.c')
-rw-r--r--src/resolve/resolvectl.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
index cec8fc31b2..10665a7e04 100644
--- a/src/resolve/resolvectl.c
+++ b/src/resolve/resolvectl.c
@@ -1457,13 +1457,14 @@ static int status_ifindex(sd_bus *bus, int ifindex, const char *name, StatusMode
printf(" LLMNR setting: %s\n"
"MulticastDNS setting: %s\n"
" DNSSEC setting: %s\n"
- " DNSSEC supported: %s\n"
- " Current DNS Server: %s\n",
+ " DNSSEC supported: %s\n",
strna(link_info.llmnr),
strna(link_info.mdns),
strna(link_info.dnssec),
- yes_no(link_info.dnssec_supported),
- strna(link_info.current_dns));
+ yes_no(link_info.dnssec_supported));
+
+ if (link_info.current_dns)
+ printf(" Current DNS Server: %s\n", link_info.current_dns);
STRV_FOREACH(i, link_info.dns) {
printf(" %s %s\n",
@@ -1684,13 +1685,14 @@ static int status_global(sd_bus *bus, StatusMode mode, bool *empty_line) {
printf(" LLMNR setting: %s\n"
"MulticastDNS setting: %s\n"
" DNSSEC setting: %s\n"
- " DNSSEC supported: %s\n"
- " Current DNS Server: %s\n",
+ " DNSSEC supported: %s\n",
strna(global_info.llmnr),
strna(global_info.mdns),
strna(global_info.dnssec),
- yes_no(global_info.dnssec_supported),
- strna(global_info.current_dns));
+ yes_no(global_info.dnssec_supported));
+
+ if (global_info.current_dns)
+ printf(" Current DNS Server: %s\n", global_info.current_dns);
STRV_FOREACH(i, global_info.dns) {
printf(" %s %s\n",