1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00
Commit Graph

55262 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
e7bd34cd64 meson: drop libgcrypt dep from resolved tests
Follow-up for pull request #21170.

I hoped that we would drop libgcrypt fully and drop all references to the
library in meson, but this doesn't seem feasible (because of the use in
sd-journal). But let's remove it here, all the resolved code has been switched
to work either of the two libraries.
2021-12-08 01:00:56 +00:00
Yu Watanabe
990d0aa980 dhcp: fix assertion failure
Fixes #21671.
2021-12-08 08:52:33 +09:00
Vito Caputo
74fb5be62d journal-file: require MMapCache* for journal_file_open()
Previously the MMapCache* was optionally NULL, which open would
handle by creating a new MMapCache* for the occasion.

This produced some slightly circuitous refcount-handling code in
the function, as well as arguably creating opportunities for
weirdness where an MMapCache* was intended to be supplied but
happened to be NULL, which this magic would then paper over.

In any case, this was basically only being utilized by tests,
apparently just to avoid having to create an MMapCache.  So
update the relevant tests to supply an MMapCache and make
journal_file_open() treat a NULL MMapCache* as fatal w/assert.
2021-12-07 14:39:20 -08:00
Vito Caputo
333d067262 mmap-cache: add MMapCache trivial cleanup helpers
Enable _cleanup_(mmap_cache_unrefp) style cleanup for MMapCache*
2021-12-07 14:16:28 -08:00
Vito Caputo
a8da63309c journal-file: goodbye JournalFile.mmap
This gets rid of the manual MMapCache ref/unref goop in
journal_file_{open,close}(), in favor of just letting the
JournalFile.cache_fd MMapFileDescriptor carry the baton.
2021-12-07 13:03:34 -08:00
Vito Caputo
8b4fbbb0a1 journal: stop using JournalFile.mmap everywhere
Preparatory commit; before JournalFile can stop hanging onto its
copy of MMapCache, all these users need to find another way.

Most of the time these callers already have the MMapCache onhand,
so it's no big deal for them to just supply it.

journal_file_rotate() in particular needed to change, and it
seemed wise to not use the mmap_cache_fd_cache() accessor on
f->cache_fd, instead requiring the caller supply the cache to
use.  This was done with an eye towards a potential future where
the journal_file_archive() isolates the cache_fd to a private
cache, which the newly rotated-to file wouldn't be allowed to
use.  It's no biggie for the existing callers to just provide the
appropriate surviving cache.

Basically the mmap_cache_fd_cache() accessor was added just for
journal-verify.c's (ab)use of the mmap-cache.  Which, if the
ugly singleton MMapCache assumption ever goes away, can be
cleaned up to simply use a separate MMapCache for those search
arrays.
2021-12-07 13:00:25 -08:00
Vito Caputo
176bf8b827 mmap-cache: add MMapFileDescriptor.cache accessor
Sometimes we want to reuse an existing MMapFileDescriptor's
cache, but it's a private struct.

This lets us access that pointer if necessary.
2021-12-07 12:42:19 -08:00
Vito Caputo
fd9ac6c307 mmap-cache: ref/unref MMapCache in fd add/free
Preparatory commit; callers manually ref/unref MMapCaches
alongside MMapFileDescriptor add/frees, when the latter should be
sufficient.

A subsequent commit will drop some of those manual MMapCache
reference hoop-jumping, leaving the lifecycle bound to
MMapFileDescriptors.
2021-12-07 12:42:19 -08:00
Yu Watanabe
8ed68422e1 network: address: read flags from message header when IFA_FLAGS is not supported by kernel
Follow-up for 0828a38605.

Fixes #21670.
2021-12-08 05:40:09 +09:00
Yu Watanabe
f14a6e7f48 network: route: tighten variable scope
Follow-up for 5e82a61375.
2021-12-08 05:39:31 +09:00
Yu Watanabe
73fc85227d sd-network: drop _public_ attribute
sd-network is not public yet.
2021-12-08 03:06:44 +09:00
Zbigniew Jędrzejewski-Szmek
f333ed27fa
Merge pull request #20476 from jamacku/new-feature-reloaded-stamp
core: indicate the time when units were loaded
2021-12-07 18:47:25 +01:00
James Hilliard
d40ce01814 bpf: refactor skeleton generation
This should hopefully fix cross compilation for the bpf programs.
2021-12-07 18:37:17 +01:00
Yu Watanabe
a88f3913cf network: tunnel: unify init functions for tunnels 2021-12-08 01:54:01 +09:00
Yu Watanabe
fbe0139f1a network: tunnel: introduce TUNNEL() helper function 2021-12-08 01:54:01 +09:00
Yu Watanabe
9e29133085 network: tunnel: create tunnels with AssignToLoopback=yes independently of .network file 2021-12-08 01:54:01 +09:00
Zbigniew Jędrzejewski-Szmek
d4f8cd4d83
Merge pull request #21625 from yuwata/network-dhcp-6rd
network: dhcp: add 6rd support
2021-12-07 17:26:37 +01:00
Luca Boccassi
f43282670b core: add StartUnitWithFlags DBUS method
When an activation job is skipped because of a Condition*= setting failing,
currently the JobRemoved signal lists 'done' as the result, just as with
a successful job.

This is a problem when doing dbus activation: dbus-broker will receive a
signal that says the job was successful, so then it moves into a state where
it waits for the requested name to appear on the bus, but that never happens
because the job was actually skipped.

Add a new StartUnitWithFlags that changes the behaviour of the JobRemoved
signal to list 'done' or 'skipped'.

Fixes #21520
2021-12-07 16:30:49 +01:00
Frantisek Sumsal
72af88f231 github: mention the systemd-devel ML in the new issue tab 2021-12-07 16:28:56 +01:00
Frantisek Sumsal
11f5f78c84
Merge pull request #21657 from mrc0mmand/codeql-shenanigans
ci: sync the list of CodeQL queries with LGTM
2021-12-07 15:28:48 +00:00
Jan Macku
15b9243c0d core: Indicate the time when the manager started loading units the last time 2021-12-07 16:02:46 +01:00
Jan Macku
49fbe940a4 core: Add new DBUS properties UnitsReloadStartTimestamp and UnitsLoadTimestampMontonic 2021-12-07 16:02:46 +01:00
Frantisek Sumsal
a3f0533ffc ci: pack-ify our custom CodeQL queries and enable them in Actions
Unlike LGTM, the CodeQL Action requires the custom queries to have their
own qlpack.yml file, so let's provide one.
2021-12-07 14:57:09 +01:00
Frantisek Sumsal
a6319961c9 ci: run the CodeQL action also when its configuration changes
Just to make sure we didn't break anything.
2021-12-07 14:45:06 +01:00
Frantisek Sumsal
64f625a212 ci: sync the list of CodeQL queries with LGTM 2021-12-07 14:45:04 +01:00
Dan Streetman
526fce97af resolve: remove server 'large' level
This removes the DNS_SERVER_FEATURE_LEVEL_LARGE, and sets the EDNS0
advertised max packet size as if always in 'large' mode.

Without this, we always send out EDNS0 opts that limit response sizes
to 512 bytes, thus the remote server will never send anything larger
and will always truncate responses larger than 512 bytes, forcing us
to drop from EDNS0 down to TCP, even though one of the primary benefits
of EDNS0 is larger packet sizes.

Fixes: #20993
2021-12-07 14:20:47 +01:00
Frantisek Sumsal
394159498d ci: add a missing SPDX header 2021-12-07 14:15:04 +01:00
Zbigniew Jędrzejewski-Szmek
3944ef20f5
Merge pull request #21264 from medhefgo/boot-lto
sd-boot: LTO support
2021-12-07 12:58:59 +01:00
Yu Watanabe
42592d0ad4 test-network: support the case that the default config files are not installed yet 2021-12-07 20:33:20 +09:00
Yu Watanabe
84cc85f983 test-network: add test for 6rd 2021-12-07 20:33:20 +09:00
Yu Watanabe
31fc1366d6 man: network: document Use6RD= setting 2021-12-07 20:33:20 +09:00
Yu Watanabe
e49bad0179 network: dhcp-pd: add 6rd support
Closes #19152.
2021-12-07 20:33:16 +09:00
Yu Watanabe
dbdcaca3ab sd-dhcp-client: support 6rd option 2021-12-07 20:32:02 +09:00
Yu Watanabe
63dc602570 network: introduce link_remove() 2021-12-07 20:32:02 +09:00
Yu Watanabe
a27588d4e7 network: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]
This just changes the names of settings, variables, functions, files, and so on.
No functionality is changed.

Preparation for supporting 6rd.
2021-12-07 20:30:30 +09:00
Yu Watanabe
5ed057b67b
Merge pull request #21653 from yuwata/network-dhcp6pd-unreachable-route-cleanups
network: dhcp6pd: cleanups for unreachable route
2021-12-07 20:28:18 +09:00
Yu Watanabe
334f1a99f7
Merge pull request #21655 from yuwata/network-creating-enslaving-netdev-cleanups
network: cleanups for creating or enslaving netdevs
2021-12-07 20:21:47 +09:00
Yu Watanabe
ab0c82d9f7 network: dhcp6pd: assign addresses in the delegated prefix instead of a subnet prefix /64 on upstream interface 2021-12-07 19:46:37 +09:00
Yu Watanabe
2747f1321d network: dhcp6pd: do not check Announce= setting when the link does not support RADV 2021-12-07 19:44:02 +09:00
Yu Watanabe
57c107544d network: fix memleak
Follow-up for ab106a609b.

Fixes CID#1467055.
2021-12-07 19:43:31 +09:00
Yu Watanabe
11d8a83f53 network: dhcp6pd: drop link_has_preferred_subnet_id() and inline condition 2021-12-07 19:43:06 +09:00
Yu Watanabe
557e1b5249 network: dhcp6pd: use the kernel's default value for priority of unreachable route
This should not change any behavior, as both values are equivalent.
2021-12-07 18:35:30 +09:00
Yu Watanabe
2d00239cbe network: dhcp6pd: always use main route table for unreachable route
This mostly reverts e47bcb7d0b.
2021-12-07 18:35:30 +09:00
Yu Watanabe
5ed10a194a network: dhcp6pd: set server address for unreachable route
This is just for json output.
2021-12-07 18:35:30 +09:00
Yu Watanabe
a536ec3872 network: dhcp6pd: gracefully handle delegated prefix whose prefixlen is larger than 64 2021-12-07 18:35:26 +09:00
Zbigniew Jędrzejewski-Szmek
8b0bc54cdb
Merge pull request #20522 from yuwata/cgroup-fix
core/cgroup: fix io.weight and blkio.weight
2021-12-07 10:24:44 +01:00
Evgeny Vereshchagin
4997d1b965 ci: pin python dependencies and let Dependabot keep track of them 2021-12-07 09:08:26 +00:00
Zbigniew Jędrzejewski-Szmek
ed0e6f0f71
Merge pull request #21307 from medhefgo/boot-alloc
sd-boot: Non-failing allocators
2021-12-07 08:20:07 +01:00
Yu Watanabe
543240f593 network/netdev: drop spurious state from the condition to create stacked netdevs
Stacked netdevs are requested when the underlying interface is in
configuring state.
2021-12-07 15:58:25 +09:00
Yu Watanabe
f7144e7b0f network/netdev: create stacked netdevs after all set-link operations are finished
E.g. setting MAC address must be done before creating VLAN interface.
2021-12-07 15:58:25 +09:00