Commit Graph

49454 Commits

Author SHA1 Message Date
heretoenhance
8d186a35cb Adding an explanation for CONFIG_NET requirement (#18600)
* README: replace CONFIG_NET with CONFIG_UNIX in requirements list
2021-02-16 16:26:51 +00:00
Lennart Poettering
1d123e772d resolved: reduce indentation level a bit 2021-02-16 16:46:01 +01:00
Lennart Poettering
13eb76ef06 resolved: let's preferably route reverse lookups for local subnets to matching interfaces
Let's preferably route traffic for reverse lookups to LLMNR/mDNS/DNS on
the matching interface if the IP address is in the local subnet. Also,
if looking up an IP address of our own host, let's avoid doing
LLMNR/mDNS at all.

This is useful if "~." is a routing domain to DNS, as it means, local
reverse lookups still go to LLMNR/mDNS, too.

Fixes: #16243 #10081
2021-02-16 16:13:42 +01:00
Lennart Poettering
1e69eaddf8 resolved: log process info of clients requesting resolution via D-Bus
Let's make things more debuggable: when debug logging is on, let's
say which client is asking for our services.

This is helpful for easily figuring out which local process might
interfere with your debugging sessions by issuing additional requests
while you try to debug a request (I am looking at you, geoclue!).
2021-02-16 13:42:49 +01:00
Lennart Poettering
ff05157f82 Merge pull request #18617 from poettering/resolved-confidential
resolved: tell clients which source a response is from, and whether it was never sent via unencrypted transports
2021-02-16 13:40:46 +01:00
Lennart Poettering
5c1790d1ce resolved: propagate source where an RR from back to client
This is extremely useful when debugging stuff: knowing whether a result
was cached, came from network, or was synthesized.
2021-02-16 10:03:43 +01:00
Lennart Poettering
43fc4baa26 resolved: add "confidential" flag for replies passed to clients
Let's introduce a new flag that indicates whether the response was
acquired in "confidential" mode, i.e. via encrypted DNS-over-TLS, or
synthesized locally.

Fixes: #12859
2021-02-16 10:03:43 +01:00
Lennart Poettering
6f055e43b8 resolved: replace "answer_authenticated" bool by uint64_t query_flags field
Let's use the same flags type we use for client communication, i.e.
instead of "bool answer_authenticated", let's use "uint64_t
answer_query_flags", with the SD_RESOLVED_AUTHENTICATED flag.

This is mostly just search/replace, i.e. a refactoring, no change in
behaviour.

This becomes useful once in a later commit SD_RESOLVED_CONFIDENTIAL is
added to indicate resolution that either were encrypted (DNS-over-TLS)
or never left the local system.
2021-02-16 10:03:43 +01:00
Lennart Poettering
0e703bb48d Merge pull request #18611 from poettering/ifname-validate-tighter
make ifname validation tighter
2021-02-16 09:52:32 +01:00
Lennart Poettering
e03d156f78 Merge pull request #18603 from poettering/socket-graveyard
resolved: keep udp sockets until we receive a reply or timeout
2021-02-16 09:51:41 +01:00
Lennart Poettering
018b642a98 resolvectl: clarify IDNA and search path logic in combination with "resolvectl query --type="
When low-level RR resolution is requested from "resolvectl query" via
"--type=" or "--class=" no search domain logic is applied and no IDNA
translation.

Explain this in detail in the documentation, and also mentions this when
users attempt to resolve single-label names or names with international
characters in the output.

I believe the current behaviour is correct, but it is indeed surprising.
Hence the documentation and output improvement.

Fixes: #11325 #10737
2021-02-16 09:51:17 +01:00
Zbigniew Jędrzejewski-Szmek
e557c82dd5 Merge pull request #18571 from bluca/portable_dbus_doc
portable: use helpers for DBUS registration and document DBUS interface
2021-02-16 08:30:27 +01:00
Zbigniew Jędrzejewski-Szmek
8f50eb04ac Merge pull request #18481 from keszybz/rpm-restart-post-trans
Restart units after the rpm transaction
2021-02-16 08:25:49 +01:00
Lennart Poettering
71311efe23 journalctl: rotation is not a reason to warn, but certainly noteworthy
Downgrade the phrasing, since it is a bit misleading.

Fixes: #18465
2021-02-15 14:41:57 -08:00
Lennart Poettering
83ce3b1944 Merge pull request #18579 from keszybz/fix-fragment-id-crash
Fix fragment id crash
2021-02-15 23:35:25 +01:00
Lennart Poettering
d68dbb37d7 resolved: close UDP socket when we received a network error on it 2021-02-15 23:14:32 +01:00
Lennart Poettering
80710ade03 resolved: instead of closing DNS UDP transaction fds right-away, add them to a socket "graveyard"
The "socket graveyard" shall contain sockets we have sent a question out
of, but not received a reply. If we'd close thus sockets immediately
when we are not interested anymore, we'd trigger ICMP port unreachable
messages once we after all *do* get a reply. Let's avoid that, by
leaving the fds open for a bit longer, until a timeout is reached or a
reply datagram received.

Fixes: #17421
2021-02-15 23:14:32 +01:00
Lennart Poettering
0886999416 Merge pull request #18605 from poettering/suppress-repeated-stub
resolved: filter repeated stub queries
2021-02-15 23:06:37 +01:00
Lennart Poettering
ee29bd5dc5 socket-util: tighten parsing of ifnames
Numeric ifnames should be acceptable only if that's enabled by flag, and
refused otherwise. Hence, let's parse as ifindex first, and if that
works decide. Finally, let's refuse any numeric ifnames that are not
valid ifindexs, but look like them.
2021-02-15 22:51:16 +01:00
Lennart Poettering
e774e6fb04 socket-util: fix indentation 2021-02-15 22:50:43 +01:00
Luca Boccassi
23e5c8d296 portabled: add DBUS documentation 2021-02-15 21:34:00 +00:00
Luca Boccassi
598f938e3b portabled: use SD_BUS_METHOD_WITH_ARGS 2021-02-15 21:30:01 +00:00
Luca Boccassi
3b91bae3ce portabled: use service_parse_argv/bus_add_implementation
Remove some boilerplate and allow introspection
2021-02-15 21:20:14 +00:00
Lennart Poettering
5e8bc852d5 resolved: don't redundantly switch DNS servers because of transaction failures
When a transaction fails and we decide to switch DNS servers, don#t do
so unconditionally. Check if the current DNS server is still the same as
when the transaction was initiated. And if not, do not do anything.

That should reduce the number of redundant DNS server switches if many
parallel transactions fail simultaneously (which is pretty likely if
DNSSEC is on).

Fixes: #17040
2021-02-15 21:59:05 +01:00
Lennart Poettering
c78735eb79 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.
2021-02-15 21:54:53 +01:00