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

36520 Commits

Author SHA1 Message Date
наб
a96fc72dbf journal: succes[s]fully typo
As found by fossies codespell:
https://fossies.org/linux/test/systemd-main.bb916f3.211208.tar.gz/codespell.html
2021-12-08 13:23:56 +00:00
Yu Watanabe
bb916f350a network: call link_check_ready() when all stacked netdevs are created
Follow-up for 879377cad5.

Otherwise, the underlying interface may stuck in configuring state.
2021-12-08 18:40:13 +09:00
Daan De Meyer
9872fe44cb
Merge pull request #21527 from vcaputo/journal-file-mfd-centric
journal-file: get rid of JournalFile.mmap
2021-12-08 09:26:53 +00:00
наб
dcd9d196a4 kernel-install: respect $MACHINE_ID and ignore /etc/machine-id if on tmpfs
Confer https://github.com/systemd/systemd/pull/19006#issuecomment-800234022:
  On some systems it's the admin's explicit choice not to to have the
  machine ID leak into the ESP
  On some systems the machine ID is transient, generated at every boot,
  and hence should not be written to the ESP
2021-12-08 09:34:02 +01:00
Yu Watanabe
733caba389
Merge pull request #21672 from yuwata/network-old-kernel-support
network: old kernel support
2021-12-08 10:11:20 +09:00
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
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
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
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
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
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
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
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
Yu Watanabe
879377cad5 network: do not block configuring addresses by creating stacked netdevs
`link_is_ready_to_configure()` is used to judge we can configure
addresses, routes, and etc. And they can be configured independently of
stacked netdevs.
2021-12-07 15:58:25 +09:00
Yu Watanabe
5329a37935 network: set MAC address before enslaving to bond or bridge interface
As the master interface may inherit the slave MAC address.
2021-12-07 15:58:25 +09:00
Zbigniew Jędrzejewski-Szmek
f66d548c1a
Merge pull request #21598 from DaanDeMeyer/journald-file
journal: Fix re-enabling COW for archived journal files on BTRFS
2021-12-07 07:35:34 +01:00
Yu Watanabe
45aa0e841b network,udev: do not adjust local assignment bit of specified MAC address
People often assigns the MAC address of the enslaved interface to e.g.
bridge interface. So, the local assignment bit should not be adjusted.

Fixes #21649.
2021-12-07 15:01:04 +09:00
Yu Watanabe
f836390fa7
Merge pull request #21642 from yuwata/network-state-file-ignore-dynamic-when-dbus-entry-exists
network: state-file: ignore dynamic entries when specified by DBus method
2021-12-07 09:51:38 +09:00
Luca Boccassi
5328f80e92
Merge pull request #21646 from mrc0mmand/lgtm-followups
LGTM follow-ups
2021-12-07 00:14:45 +00:00
Luca Boccassi
3f88d5046f
Merge pull request #21639 from yuwata/network-dhcp6pd-use-dhcp6_pd_prefix_acquired
network: dhcp6pd: use dhcp6 pd prefix acquired() and drop dhcp6_pd_distribute_prefix()
2021-12-07 00:14:04 +00:00
Yu Watanabe
a0af85e02c
Merge pull request #21196 from yuwata/process-util-nulstr
process-util: handle double NUL as the end of command line
2021-12-07 08:29:34 +09:00
Yu Watanabe
56437e33a6 network: state-file: do not append dynamic entries when specified by DBus method
Fixes #21515.
2021-12-07 06:43:14 +09:00