diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-08 20:59:03 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-11 19:40:00 +0100 |
commit | 6cb08a8930bdaca950b152b1e8b82466ed59511c (patch) | |
tree | 894c40254d31b8ee864d20b0f481384391413617 /src/resolve/resolved-link.c | |
parent | 6bb2c08597c999c429e889cd2403b2fef5f3e1a0 (diff) |
resolved: cache formatted server string in DnsServer structure
This makes it easier to log information about a specific DnsServer object.
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r-- | src/resolve/resolved-link.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c index 30838ef8cc..928307e004 100644 --- a/src/resolve/resolved-link.c +++ b/src/resolve/resolved-link.c @@ -463,12 +463,8 @@ DnsServer* link_set_dns_server(Link *l, DnsServer *s) { if (l->current_dns_server == s) return s; - if (s) { - _cleanup_free_ char *ip = NULL; - - in_addr_to_string(s->family, &s->address, &ip); - log_info("Switching to DNS server %s for interface %s.", strna(ip), l->name); - } + if (s) + log_info("Switching to DNS server %s for interface %s.", dns_server_string(s), l->name); dns_server_unref(l->current_dns_server); l->current_dns_server = dns_server_ref(s); |