]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved-dns-stream: pass the right error variable
authorDavid Tardon <dtardon@redhat.com>
Tue, 7 May 2024 11:23:01 +0000 (13:23 +0200)
committerDavid Tardon <dtardon@redhat.com>
Tue, 7 May 2024 11:23:24 +0000 (13:23 +0200)
src/resolve/resolved-dns-stream.c

index 056ba7794f5dd2f270b71a6f5c660a5a8c96600b..1a43d0bd4981b7608b12fe217e23661925810d45 100644 (file)
@@ -195,7 +195,7 @@ static int dns_stream_identify(DnsStream *s) {
                 /* Make sure all packets for this connection are sent on the same interface */
                 r = socket_set_unicast_if(s->fd, s->local.sa.sa_family, s->ifindex);
                 if (r < 0)
-                        log_debug_errno(errno, "Failed to invoke IP_UNICAST_IF/IPV6_UNICAST_IF: %m");
+                        log_debug_errno(r, "Failed to invoke IP_UNICAST_IF/IPV6_UNICAST_IF: %m");
         }
 
         s->identified = true;
@@ -454,7 +454,7 @@ static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *use
         if (progressed && s->timeout_event_source) {
                 r = sd_event_source_set_time_relative(s->timeout_event_source, DNS_STREAM_ESTABLISHED_TIMEOUT_USEC);
                 if (r < 0)
-                        log_warning_errno(errno, "Couldn't restart TCP connection timeout, ignoring: %m");
+                        log_warning_errno(r, "Couldn't restart TCP connection timeout, ignoring: %m");
         }
 
         return 0;