mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 15:50:26 +01:00
dns: don't print empty configurations
Previously we printed the DNS configuration for all devices including
unmanaged and unconfigured ones:
dns-mgr: config: 100 best v4 ens3 : 192.168.10.1
dns-mgr: config: 100 default v6 ens3 : fd01🔡:3681:c4ff:fec0:fe94
dns-mgr: config: 100 default v4 lo :
dns-mgr: config: 100 default v6 lo :
dns-mgr: config: 100 default v4 ens9 :
dns-mgr: config: 100 default v6 ens9 :
Instead, print only devices that have name servers set.
This commit is contained in:
parent
8c4e824997
commit
5307e07e3b
1 changed files with 10 additions and 7 deletions
|
|
@ -1044,13 +1044,16 @@ update_dns (NMDnsManager *self,
|
|||
|
||||
prev_prio = prio;
|
||||
|
||||
_LOGT ("config: %8d %-7s v%c %-16s %s: %s",
|
||||
prio,
|
||||
_config_type_to_string (current->type),
|
||||
v4 ? '4' : '6',
|
||||
current->iface,
|
||||
skip ? "<SKIP>" : "",
|
||||
get_nameserver_list (current->config, &tmp_gstring));
|
||||
if ( ( v4 && nm_ip4_config_get_num_nameservers ((NMIP4Config *) current->config))
|
||||
|| (!v4 && nm_ip6_config_get_num_nameservers ((NMIP6Config *) current->config))) {
|
||||
_LOGT ("config: %8d %-7s v%c %-16s %s: %s",
|
||||
prio,
|
||||
_config_type_to_string (current->type),
|
||||
v4 ? '4' : '6',
|
||||
current->iface,
|
||||
skip ? "<SKIP>" : "",
|
||||
get_nameserver_list (current->config, &tmp_gstring));
|
||||
}
|
||||
|
||||
if (!skip) {
|
||||
merge_one_ip_config_data (self, &rc, current);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue