| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Fixes a regression caused by 2976730a4d34749bfb7a88da341464f1834ab1c6.
Fixes #36078.
Fixes #36126.
Co-authored-by: Luca Boccassi <luca.boccassi@gmail.com>
|
| |
|
|
|
|
|
|
| |
According to RFC 9460 "An empty list of addresses is invalid."
https://www.rfc-editor.org/rfc/rfc9460.html#section-7.3
|
|\
| |
| |
| | |
(#36071)
|
| | |
|
|/
|
|
|
|
|
|
|
| |
long-running services
Given we have the generic interface, let's hook it up everywhere.
This doesnt bother with the Reload() call usually, since that's more
involved, but hooks up the other relevant functions where applicable.
|
|
|
|
|
| |
This also drops HAVE_WSTRINGOP_TRUNCATION as the corresponding option
was introduced in GCC 8, and our baseline is GCC 8.4.
|
|
|
|
|
| |
Support for C added in gcc 15:
https://github.com/gcc-mirror/gcc/commit/236c0829ee21a179c81b83f0d7f112ca23c47a4d
|
|
|
|
| |
Our baseline is gcc 8.4.
|
|
|
|
|
| |
Drop the extra `I` and rename the constant to DNS_EDE_RCODE_PROHIBITED
in accordance with the error code string.
|
|
|
|
|
|
|
| |
Currently on reload mdns/lnrr are enabled if they were disabled,
but not viceversa. Fix it.
Follow-up for 14a52176798bc2d013297b503ac6fa49a64e2725
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
candidate to succeed quickly
Fixes #22575, as suggested by poettering in #35514.
Intended as a workaround for some buggy routers, which refuse to send empty
replies. If systemd-resolved starts two DnsTransactions, one for A and one
for AAAA, and the domain in question has no AAAA entry, then the server will
send a reply for A and no reply for AAAA. Correct behavior for the server would
be to send an empty reply for AAAA.
systemd-resolved would previously keep retrying the AAAA transaction, and
eventually timeout the whole query, returning an error to the caller.
Now, if the server replies to one query and not another, we cut short the
timeout and return the partial result. Returning the partial result allows
the rest of the system to keep working. It matches how e.g. glibc libnss_dns
behaves.
|
|
|
|
|
|
| |
The values that were previously hardcoded in sd-varlink.c are now defined
in new varlink_set_info_systemd() and that function is called everywhere
where we create a server.
|
|
|
|
| |
For justification, see 3f9a0a522f2029e9295ea5e9984259022be88413.
|
|
|
|
|
|
|
|
|
|
|
| |
In https://bugzilla.redhat.com/show_bug.cgi?id=2322937 we're getting
an error message:
Okt 29 22:21:03 fedora systemd-resolved[29311]: Could not create manager: Cannot allocate memory
I expect that this actually comes from dnstls_manager_init(), the
openssl version. But without real logs it's hard to know for sure.
Use EIO instead of ENOMEM, because the problem is unlikely to be actually
related to memory.
|
| |
|
|
|
|
| |
Fixes https://github.com/systemd/systemd/security/code-scanning/2900
|
|
|
|
|
|
|
| |
After d2ebf5cc1d59e29139f06efaa3a9b2c184cdaa25, sd_varlink_error() and
friends return negative errno.
Fixes https://github.com/systemd/systemd/pull/34946#discussion_r1823703636.
|
|\
| |
| | |
resolved: fixes when trying to serialize overly long DNS names
|
| | |
|
| |
| |
| |
| | |
Fixes: #33671
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
compression hash table again
let's make sure we undo any pollution of the label compression hash
table.
Fixes: #33671
|
| |
| |
| |
| |
| |
| |
| | |
Even if we have no problem processing them they are invalid according to
RFC, hence refuse.
Fixes: #34416
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We often used a pattern like if (!FLAGS_SET(flags, SD_JSON_FORMAT_OFF)),
which is rather verbose and also contains a double negative, which we try
to avoid. Add a little helper to avoid an explicit bit check.
This change clarifies an aditional thing: in some cases we treated
SD_JSON_FORMAT_OFF as a flag (flags & SD_JSON_FORMAT_OFF), while in other cases
we treated it as an independent enum value (flags == SD_JSON_FORMAT_OFF).
In the first form, flags like SD_JSON_FORMAT_SSE do _not_ turn the json
output on, while in the second form they do. Let's use the first form
everywhere.
No functional change intended.
Initially I wasn't sure if this helper should be made public or just internal,
but it seems such a common pattern that if we expose the flags, we might just
as well expose it too, to make life easier for any consumers.
|
|/
|
|
| |
(#34893)
|
|
|
|
|
|
|
|
|
| |
CNAME doesn't exist at the zone apex. When we get an unsigned noerror
response to a direct query for a CNAME record, we don't yet know if this
name is zone apex. We already request the correct DS record in this
case, but previously skipped it at validation time, causing the answer
to appear bogus. Make sure to also consider the DS record for the query
name for negative replies.
|
|\
| |
| | |
RFC9463: Discovery of Network-designated Resolvers
|
| |
| |
| |
| |
| | |
This duplicates the svc param constants for the benefit of the
resolved-core library.
|
| |
| |
| |
| |
| |
| |
| | |
This type will be used to represent a "designated resolver", and the
necessary info for communicating with it. Beyond and address endpoint,
we may need to know the dns transport, authenticated domain name, DoH
path, etc.
|
|\ \
| | |
| | | |
resolve: fixes for sd-resolved bypass
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously a full packet was cached only if the CD bit was set, but this
no longer corresponds to the cases where bypass is enabled.
Update the cache to retain a full packet in the cases where it might
actually be useful.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is useful for a validating resolver to indicate to a non-validating
resolver when checking was disabled for the query. This matches the
behavior of the major public resovlers in response to queries with CD bu
tnot DO set.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Following 13e15dae9f0b, resolved does not forward the AD bit for bypass
queries, but resolved also didn't do it's own validation, making these
replies appear to never be authentic. We should enable validation for
bypass queries.
Let's disable our own validation when processing a +cd query, and also
ensure that it skips the cache so that we don't accidentally fail to
return inauthentic replies from upstream.
Previously, when we had a bypass transaction without cd, a cached,
authenticated, reply with cd could be served, leaving the cd bit
erroneously set in the reply. Only reply with a CD bit if the client
requested it.
Fixes: 13e15dae9f0b (resolved: clear the AD bit for bypass packets)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This might have the effect that some DNS server or search domain
disappears, hence rewrite the relevant files.
See: #27543
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
../src/resolve/resolved-bus.c: In function ‘call_link_method’:
../src/resolve/resolved-bus.c:1769:16: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized]
1769 | return handler(message, l, error);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/resolve/resolved-bus.c:1755:15: note: ‘l’ was declared here
1755 | Link *l;
| ^
../src/resolve/resolved-bus.c: In function ‘bus_method_get_link’:
../src/resolve/resolved-bus.c:1828:13: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized]
1828 | p = link_bus_path(l);
| ^~~~~~~~~~~~~~~~
../src/resolve/resolved-bus.c:1816:15: note: ‘l’ was declared here
1816 | Link *l;
| ^
|
| | |
|
| |
| |
| |
| |
| |
| | |
We should not invalidate the socket address size before we use it.
Fixes: #34579
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
This tries to get rid of most manual sigprocmask() changes, in favour
of:
1. The SD_EVENT_SIGNAL_PROCMASK flag to sd_event_add_signal()
2. The sd_event_set_signal_exit() call for handling SIGTERM/SIGINT
3. Move masking of SIGWINCH into ptyfwd, out of nspawn/vmspawn/run
And while we are at it get rid of a bunch of event source fields whose
lifetime is bound to the sd_event object they belong to anyway, and make
use of the "floating" event source feature of sd-event instead.
|
|
|
|
|
|
|
|
| |
This way we don't have to pull in net/if.h into format-util.h.
This is supposed to address https://github.com/systemd/systemd/pull/32212#discussion_r1755639881
No actual code changes, just a .c/.h file split-up.
|
| |
|
| |
|
|\
| |
| | |
move dnssd configuration file parsing from generic code into dnssd source files
|
| |
| |
| |
| | |
Let's keep only the parsers for the main config in resolved-conf.c
|
| |
| |
| |
| | |
resolved-dnssd.h
|
| | |
|
| |
| |
| |
| | |
And add a mirroring dns_scope_ifname()
|