summaryrefslogtreecommitdiff
path: root/src/nss-resolve/nss-resolve.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-02-05 18:46:18 +0100
committerLennart Poettering <lennart@poettering.net>2021-02-05 18:46:18 +0100
commit425ed13991153bd274a86009459b00ec8a709f30 (patch)
treed4a58bc58752069e191adb7e252dbd894f2b4081 /src/nss-resolve/nss-resolve.c
parent6da52ca861a1cae3f453d50dbb6fac6666a73f4b (diff)
downloadsystemd-425ed13991153bd274a86009459b00ec8a709f30.tar.gz
nss-resolve: shortcut fixing of ifindex if it's zero anyway
Diffstat (limited to 'src/nss-resolve/nss-resolve.c')
-rw-r--r--src/nss-resolve/nss-resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index 458eb487a5..fb1d61fea9 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/nss-resolve/nss-resolve.c
@@ -68,7 +68,7 @@ static int connect_to_resolved(Varlink **ret) {
static uint32_t ifindex_to_scopeid(int family, const void *a, int ifindex) {
struct in6_addr in6;
- if (family != AF_INET6)
+ if (family != AF_INET6 || ifindex == 0)
return 0;
/* Some apps can't deal with the scope ID attached to non-link-local addresses. Hence, let's suppress that. */