resolved: reuse check for link-local IP address lookups
authorLennart Poettering <lennart@poettering.net>
Mon, 9 Nov 2020 17:37:13 +0000 (18:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Feb 2021 20:54:53 +0000 (21:54 +0100)
commitc78735eb795f1377d8d08bc57401efe742d9ec19
treec654932281e487f2803e48a570450f4e21e8ccb0
parentbb3443d4f6d4d47a4e318ea9fabc894b30cb151d
resolved: reuse check for link-local IP address lookups

Let's reuse accept_link_local_reverse_lookups() at one more place, where
we check for the list of link local reverase address domains. Since we
don't actually accept the domains here (but rather the opposite, not
accept), let's rename the function a bit more generically with accept_ →
match_.

While we are at it invert the if branches, to make things more easily
understandable: filter out the unwatnted stuff and have the "all good"
state as main codepath.
src/resolve/resolved-dns-scope.c