resolved: in dns stub always report "lo" as interface for "localhost"
authorLennart Poettering <lennart@poettering.net>
Fri, 25 Nov 2022 11:09:33 +0000 (12:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 25 Nov 2022 16:37:13 +0000 (17:37 +0100)
commit84d194f1e8bf2bb82ee22a3078201b6460fcd5e5
treeb5a6d95656517ba8b18ed9522f0b3b8719e2e935
parent4cb8a25b04f7a5f57f98dc08db155b8d071a51f5
resolved: in dns stub always report "lo" as interface for "localhost"

Previously, we'd return the ifindex the user asked on, and if none was
specified "lo". Let's always return "lo".

This should be a better choice usually, since localhost addresses are
typically not reachable over arbitrary interfaces once SO_BINDTODEVICE
or so is used. Hence, let's report the interface that is always right
for these addresses.
src/resolve/resolved-dns-synthesize.c
src/resolve/resolved-dns-synthesize.h