From 39974d2ee3b1e514e9d2cf25e4a11447d4dfee53 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 18 Nov 2022 16:52:01 +0100 Subject: [PATCH] resolved: use right conditionalization when setting unicast ifindex on UDP sockets (cherry picked from commit 5faaed5b62d5ed88d8df2802c5ab4d3ab2eb755a) Related: #2138081 --- src/resolve/resolved-dns-scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index 852829569d..4f744499aa 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -424,7 +424,7 @@ static int dns_scope_socket( return r; } - if (s->link) { + if (ifindex != 0) { r = socket_set_unicast_if(fd, sa.sa.sa_family, ifindex); if (r < 0) return r;