resolved: never allow _gateway lookups to go to the network
authorLennart Poettering <lennart@poettering.net>
Wed, 11 Nov 2020 16:38:21 +0000 (17:38 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Dec 2020 23:56:27 +0000 (08:56 +0900)
commitfbbc72189f7844df8500bb10a58988f70bf90c99
tree39c3e53fbc4f798d4f3ce2ed1c283f4a3b7852e9
parent19bcef9dc3fde342f138394333ab04d7e44b7da2
resolved: never allow _gateway lookups to go to the network

Make them rather fail than go to the network.

Previously we'd filter them on LLMNR (explicitly) and MDNS (implicitly,
because it doesn't have .local suffix), but not on DNS.

In order to make _gateway truly reliable, let's not allow it to go to
DNS either, and keep it local.

This is particular relevant, as clients can now request lookups without
local RR synthesis, where we'd rather have NXDOMAIN returned for
_gateway than have it hit the network.
src/resolve/resolved-dns-scope.c