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)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Dec 2020 13:31:40 +0000 (14:31 +0100)
commitcbea0e5a8302d5d1ae96c6e9cbbf8211a7d5354b
treefabd40984f6d6da235267205544a4bea87cb78e5
parentc4df66816b6d0403c572a638c2cd393d7f0056d0
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.

(cherry picked from commit fbbc72189f7844df8500bb10a58988f70bf90c99)
src/resolve/resolved-dns-scope.c