Age | Commit message (Collapse) | Author |
|
Previously, when we couldn't connect to a DNS server via TCP we'd abort the whole transaction using a
"connection-failure" state. This change removes that, and counts failed connections as "lost packet" events, so that
we switch back to the UDP protocol again.
|
|
This also introduces a new macro siphash24_compress_byte() which is useful to add a single byte into the hash stream,
and ports one user over to it.
|
|
The hash operations are not really that specific to hashmaps, hence split them into a .c module of their own.
|
|
|
|
Rather than walking a list of valid values one-by-one, generate a
switch-case statement for the IN_SET() macro. This allows the compiler to
further optimize its code output, possibly by generating jump tables.
This effectively decreases the binary size slightly.
The implementation is based on macro overloading depending on the number of
arguments. h/t to the following post:
https://stackoverflow.com/questions/11761703/overloading-macro-on-number-of-arguments
|
|
In a couple of cases we maintain configuration settings that know an on
and off state, like a boolean, plus some additional states. We generally
parse them as booleans first, and if that fails check for specific
additional values.
This adds a generalized set of macros for parsing such settings, and
ports one use in resolved and another in networkd over to it.
|
|
core: socket options fix SCTP_NODELAY
|
|
|
|
SCTP_NODELAY is diffrent to TCP_NODELAY.
Apply proper options in case of SCTP.
|
|
It's weird doing bitwise operations on booleans. Let's use the boolean
XOR (i.e. "!=") instead of the bitweise XOR (i.e. "^") on them.
|
|
|
|
this is a follow-up for commit 11c3a36649e5e5e77db499c92f3
|
|
The file /sys/module/ipv6 does not exist in all container
implementations (e.g. Virtuozzo). Using /proc/net/sockstat6
detects IPv6 support reliably in these environments, too.
This file does not exist when the kernel is not compiled with
IPv6 support, or if IPv6 support is disabled, so simply checking
for existence should be a suitable check.
Fixes #2059
|
|
This adds an self-standing RB-Tree implementation to src/basic/. This
will be needed for NSEC RR lookups, since we need "close lookups", which
hashmaps (not even ordered-hashmaps) can give us in reasonable time.
|
|
Borked since
commit 3ee897d6c2401effbc82f5eef35fce405781d6c8
Author: Lennart Poettering <lennart@poettering.net>
Date: Wed Sep 23 01:00:04 2015 +0200
tree-wide: port more code to use send_one_fd() and receive_one_fd()
because here our fd is not connected and we need to specify
the address.
|
|
We need to check the same thing in multiple tests. Use a shared
macro to make it easier to update the list of errnos.
Change the errno code for "unitialized cgroup fs" for ENOMEDIUM.
Exec format error looks like something more serious.
This fixes test-execute invocation in mock.
|
|
|
|
My previous patch to only include what we use accidentially placed
the added inlcudes in non-sorted order.
|
|
This is a cleaned up result of running iwyu but without forward
declarations on src/basic.
|
|
Let's distuingish the cases where our code takes an active role in
selinux management, or just passively reports whatever selinux
properties are set.
mac_selinux_have() now checks whether selinux is around for the passive
stuff, and mac_selinux_use() for the active stuff. The latter checks the
former, plus also checks UID == 0, under the assumption that only when
we run priviliged selinux management really makes sense.
Fixes: #1941
|
|
The header file defines some helpers for GLIBC NSS and doesn't include
anything else but glibc headers, hence there's little reason to keep it
in shared/.
See: #2008
|
|
|
|
After all, this is likely a local DNS forwarder that caches anyway,
hence there's no point in caching twice.
Fixes #2038.
|
|
ordered_set_ensure_allocated() does for an OrderedSet, what
set_ensure_allicated() does for a Set.
|
|
The x32 architecture has a small "long" type which is not enough to hold
struct statfs.f_type.
|
|
|
|
|
|
Virtualbox should be detected as 'oracle'. This used to work but broke
with commit:
commit 75f86906c52735c98dc0aa7e24b773edb42ee814
Author: Lennart Poettering <lennart@poettering.net>
Date: Mon Sep 7 13:42:47 2015 +0200
basic: rework virtualization detection API
We swap detection for dmi and cpuid, this fixes Virtualbox with KVM.
Hopefully it does not break anything else.
|
|
tree-wide: sort includes in *.h
|
|
libsystemd-network: add support for "Client FQDN" DHCP option (v2)
|
|
This is a continuation of the previous include sort patch, which
only sorted for .c files.
|
|
|
|
|
|
Only cosmetics really, doesn't change any actual logic.
|
|
|
|
use them everywhere
|
|
|
|
siphash24: let siphash24_finalize() and siphash24() return the result…
|
|
Rather than passing a pointer to return the result, return it directly
from the function calls.
Also, return the result in native endianess, and let the callers care
about the conversion. For hash tables and bloom filters, we don't care,
but in order to keep MAC addresses and DHCP client IDs stable, we
explicitly convert to LE.
|
|
Sort the includes accoding to the new coding style.
|
|
siphash: alignment
|
|
tmpfiles: create subvolumes for "v", "q", and "Q" only if / is a subv…
|
|
It's not a good idea to create subvolumes for parts of the OS tree (such
as /home, or /var) if the root directory is not a subvolume too. We
shouldn't assume control of "heavier" objects such as subvolumes, if the
originating object (the root directory) is a "light-weight" object, i.e.
a plain directory.
Effectively this means that chroot() environments that are run on a
plain directory do not have to deal with problems around systemd
creating subvolumes that cannot be removed with a simple "rm" anymore.
However, if the chroot manager creates a proper subvolume for such an
environment it will also get further subvolumes placed in there, under
the assumption that the manager understands the concept of subvolumes in
that case.
|
|
Change the "out" parameter from uint8_t[8] to uint64_t. On architectures which
enforce pointer alignment this fixes crashes when we previously cast an
unaligned array to uint64_t*, and on others this should at least improve
performance as the compiler now aligns these properly.
This also simplifies the code in most cases by getting rid of typecasts. The
only place which we can't change is struct duid's en.id, as that is _packed_
and public API, so we can't enforce alignment of the "id" field and have to
use memcpy instead.
|
|
Use unaligned_read_le64() to access input buffer when reading complete
64-bit words.
This should fix memory traps on platforms with strict aliasing.
|
|
Also add test code for that.
|
|
Enable TasksMax by default for all units
|
|
nitpick from PR #1910
|
|
src/basic/virt.c: In function 'detect_vm_device_tree':
src/basic/virt.c:117:17: error: unknown type name '_cleanup_closedir_'
_cleanup_closedir_ DIR *dir = NULL;
src/basic/virt.c:128:17: error: implicit declaration of function 'FOREACH_DIRENT' [-Werror=implicit-function-declaration]
FOREACH_DIRENT(dent, dir, return -errno)
|
|
nginx defines an uppercase "M" that way (in contrast to the lowercase
"m" for "minute"), and it sounds like an OK logic to follow, so that we
understand a true superset of time values nginx understands.
http://nginx.org/en/docs/syntax.html
|