summaryrefslogtreecommitdiffstats
path: root/src/resolve
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-09-04 09:26:17 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-09-04 16:54:35 +0200
commit1c17bcb3ad2b164917f3c0f72a3f067a81b72c13 (patch)
tree4ec9bfaff634dc0e947df5fb694f9e918cbf93fc /src/resolve
parentresolve: do not set IPv4 specific options on IPv6 socket (diff)
downloadsystemd-1c17bcb3ad2b164917f3c0f72a3f067a81b72c13.tar.xz
systemd-1c17bcb3ad2b164917f3c0f72a3f067a81b72c13.zip
resolve: adjust error messages
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-stub.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/resolve/resolved-dns-stub.c b/src/resolve/resolved-dns-stub.c
index 88a6a0616a..a8011d16f3 100644
--- a/src/resolve/resolved-dns-stub.c
+++ b/src/resolve/resolved-dns-stub.c
@@ -534,19 +534,11 @@ static int manager_dns_stub_udp_fd_extra(Manager *m, DNSStubListenerExtra *l) {
return 0;
fail:
+ assert(r < 0);
(void) in_addr_port_to_string(l->family, &l->address, l->port, &pretty);
if (r == -EADDRINUSE)
- return log_warning_errno(r,
- "Another process is already listening on UDP socket %s.\n"
- "Turning off local DNS stub extra support.", strnull(pretty));
- if (r == -EPERM)
- return log_warning_errno(r,
- "Failed to listen on UDP socket %s: %m.\n"
- "Turning off local DNS stub extra support.", strnull(pretty));
-
- assert(r < 0);
-
- return log_warning_errno(r, "Failed to listen on UDP socket %s, ignoring: %m", strnull(pretty));
+ return log_warning_errno(r, "Another process is already listening on UDP socket %s: %m", strnull(pretty));
+ return log_warning_errno(r, "Failed to listen on UDP socket %s: %m", strnull(pretty));
}
static int on_dns_stub_stream_packet(DnsStream *s) {
@@ -706,19 +698,11 @@ static int manager_dns_stub_tcp_fd_extra(Manager *m, DNSStubListenerExtra *l) {
return 0;
fail:
+ assert(r < 0);
(void) in_addr_port_to_string(l->family, &l->address, l->port, &pretty);
if (r == -EADDRINUSE)
- return log_warning_errno(r,
- "Another process is already listening on TCP socket %s.\n"
- "Turning off local DNS stub extra support.", strnull(pretty));
- if (r == -EPERM)
- return log_warning_errno(r,
- "Failed to listen on TCP socket %s: %m.\n"
- "Turning off local DNS stub extra support.", strnull(pretty));
-
- assert(r < 0);
-
- return log_warning_errno(r, "Failed to listen on TCP socket %s, ignoring: %m", strnull(pretty));
+ return log_warning_errno(r, "Another process is already listening on TCP socket %s: %m", strnull(pretty));
+ return log_warning_errno(r, "Failed to listen on TCP socket %s: %m", strnull(pretty));
}
int manager_dns_stub_start(Manager *m) {