]>
git.ipfire.org Git - thirdparty/systemd.git/log
Yu Watanabe [Wed, 28 Sep 2022 09:09:29 +0000 (18:09 +0900)]
udev-builtin-net_id: fix potential buffer overflow
Yu Watanabe [Wed, 28 Sep 2022 09:12:43 +0000 (18:12 +0900)]
udev-builtin-net_id: various coding style cleanups
Yu Watanabe [Tue, 1 Aug 2023 02:09:25 +0000 (11:09 +0900)]
udev-builtin-net_id: introduce device_is_stacked() helper function
Then, we can drop LinkInfo struct.
No functional change, just refactoring.
Yu Watanabe [Tue, 1 Aug 2023 02:08:43 +0000 (11:08 +0900)]
udev-builtin-net_id: drop unused arguments
Yu Watanabe [Tue, 1 Aug 2023 12:32:48 +0000 (21:32 +0900)]
Merge pull request #28611 from yuwata/meson-use-template
meson: use template (part 4)
David Tardon [Tue, 1 Aug 2023 08:44:06 +0000 (10:44 +0200)]
core: free the strings in the set in other places too
Follow-up for #28551.
Yu Watanabe [Tue, 1 Aug 2023 11:52:47 +0000 (20:52 +0900)]
Merge pull request #28609 from yuwata/udev-builtin-net_id-cleanups-part2
udev: several cleanups and fixes for net_id builtin (part2)
Curtis Klein [Fri, 5 May 2023 23:17:13 +0000 (16:17 -0700)]
watchdog: Allow the watchdog to be disabled at runtime
manager_{get|set|override}_watchdog check the validity of the new
timeout or the overridden timeout values using timestamp_is_set which
does not recognize "0" as a valid value. However since
f16890f , "0"
indicates a disabled watchdog and so is a value we should be able to
configure in order to disable the watchdog. A value of USEC_INFINITY is
considered a no-op. The behavior should be the same for all watchdog
timeout configurations (runtime, pretimeout, and shutdown).
dependabot[bot] [Tue, 1 Aug 2023 09:03:25 +0000 (09:03 +0000)]
build(deps): bump github/codeql-action from 2.20.1 to 2.21.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.1 to 2.21.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/
f6e388ebf0efc915c6c5b165b019ee61a6746a38 ...
0ba4244466797eb048eb91a6cd43d5c03ca8bd05 )
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Daan De Meyer [Tue, 1 Aug 2023 07:59:38 +0000 (09:59 +0200)]
Merge pull request #28556 from DaanDeMeyer/repart
repart: Allow combining CopyBlocks= and CopyFiles=
Yu Watanabe [Sun, 25 Jun 2023 07:34:27 +0000 (16:34 +0900)]
meson: move declarations of cgroups-agent, id128, volatile-root, and path
Yu Watanabe [Sun, 25 Jun 2023 07:31:06 +0000 (16:31 +0900)]
meson: move declarations of delta, escape, notify, creds, and battery-check
Yu Watanabe [Sun, 25 Jun 2023 07:28:21 +0000 (16:28 +0900)]
meson: move declarations of ac-power, detect-virt, sysctl, and sleep
Yu Watanabe [Sun, 25 Jun 2023 07:23:40 +0000 (16:23 +0900)]
meson: move declarations of repart and friends
Yu Watanabe [Sun, 25 Jun 2023 07:21:17 +0000 (16:21 +0900)]
meson: move declarations of fsck, firstboot, machine-id-setup, and remount-fs
Yu Watanabe [Sun, 25 Jun 2023 07:11:55 +0000 (16:11 +0900)]
meson: move declarations of random-seed, vconsole, and sysupdate
Yu Watanabe [Sun, 25 Jun 2023 07:10:00 +0000 (16:10 +0900)]
meson: move declarations of pstore, oomd, and binfmt
Yu Watanabe [Sun, 25 Jun 2023 07:07:31 +0000 (16:07 +0900)]
meson: move declarations of coredumpd and friends
Yu Watanabe [Sun, 25 Jun 2023 07:06:20 +0000 (16:06 +0900)]
meson: move declarations of journal-remote and friends
Yu Watanabe [Sun, 25 Jun 2023 07:05:38 +0000 (16:05 +0900)]
meson: move declarations of machined and friends
Yu Watanabe [Tue, 1 Aug 2023 06:53:32 +0000 (15:53 +0900)]
docs: fix typo
Daan De Meyer [Tue, 1 Aug 2023 06:09:10 +0000 (08:09 +0200)]
Merge pull request #28608 from yuwata/meson-use-template
meson: use template (part 3)
Daan De Meyer [Fri, 28 Jul 2023 21:19:58 +0000 (23:19 +0200)]
units: Import all repart credentials in systemd-repart.service
Daan De Meyer [Fri, 28 Jul 2023 20:17:35 +0000 (22:17 +0200)]
repart: Add --oem and OEM=
--oem can be used to only install OEM partitions (usr, verity,
verity-sig, ...). OEM= is used to indicate OEM partitions. If unset,
defaults to !FactoryReset. We also add a credential repart.oem to
allow configuring --oem via a credential.
Daan De Meyer [Fri, 28 Jul 2023 20:17:20 +0000 (22:17 +0200)]
creds-util: Add read_credential_bool()
Daan De Meyer [Fri, 28 Jul 2023 16:09:29 +0000 (18:09 +0200)]
repart: Allow combining CopyBlocks= and CopyFiles=
Let's allow the combination of these two options. When used, repart
will first try to apply the CopyBlocks= behavior. If that's not possible,
it falls back to the CopyFiles= behavior.
This is a first step in being able to also use the partition definition
files shipped in the image to build the image in mkosi instead of having
a separate set of repart definition files to build the image.
Daan De Meyer [Fri, 28 Jul 2023 15:44:03 +0000 (17:44 +0200)]
repart: Open files in context_minimize()
Instead of relying on context_open_copy_blocks_paths() to do the
opening, let's just do it in context_minimize() itself as it's trivial.
Yu Watanabe [Mon, 31 Jul 2023 19:18:52 +0000 (04:18 +0900)]
udev-builtin-net_id: split-out pci_get_onboard_index() from dev_pci_onboard()
This also changes the onboard index type to unsigned, as it is at most
2^16 - 1. Hence, unsigned is enough.
Then, we can use device_get_sysattr_unsigned() helper function.
This also drops mostly redundant debugging logs. The index will be
logged later anyway.
Yu Watanabe [Tue, 1 Aug 2023 00:58:56 +0000 (09:58 +0900)]
udev-builtin-net_id: split-out get_pci_slot_specifiers()
Then, we can replace multiple strpcpyf() with single snprintf_ok().
No functional change, just refactoring.
Yu Watanabe [Mon, 31 Jul 2023 20:02:19 +0000 (05:02 +0900)]
udev-builtin-net_id: introduce get_port_specifier() helper function
To make the port specifier unified.
No functional change, just refactoring.
Yu Watanabe [Thu, 22 Sep 2022 06:53:35 +0000 (15:53 +0900)]
udev-builtin-net_id: split out get_dev_port() and make its failure critical
As dev_port and dev_id sysfs attributes are fundamental properties for
network interfaces. Hence, it should not fail.
Also, the type of dev_port is changed to unsigned. The kernel internally
uses 'unsigned short' for dev_port and dev_id. Hence, unsigned (that is,
32 bits) is still overkill, but should be enough.
Yu Watanabe [Mon, 31 Jul 2023 18:27:33 +0000 (03:27 +0900)]
udev-builtin-net_id: split-out pci_get_hotplug_slot() and pci_get_hotplug_slot_from_address()
No functional changes, just refactoring.
Yu Watanabe [Mon, 31 Jul 2023 18:25:39 +0000 (03:25 +0900)]
udev-builtin-net_id: return earlier when hotplug slot is not found
Then we can reduce indentation.
No functional change, just refactoring.
Yu Watanabe [Mon, 31 Jul 2023 18:22:57 +0000 (03:22 +0900)]
udev-builtin-net_id: skip non-directory entry earlier
In the below, we will try to read 'address' file in the directory,
hence the entry must be a directory.
No functional change, just a tiny optimization.
Pierre GRASSER [Mon, 31 Jul 2023 22:21:04 +0000 (00:21 +0200)]
po: Translated using Weblate (French)
Currently translated at 100.0% (227 of 227 strings)
Co-authored-by: Pierre GRASSER <pierre.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fr/
Translation: systemd/main
Yu Watanabe [Sun, 25 Jun 2023 07:04:32 +0000 (16:04 +0900)]
meson: move declarations of timedated and friends
Yu Watanabe [Sun, 25 Jun 2023 07:01:31 +0000 (16:01 +0900)]
meson: move declarations of localed and hostnamed
Yu Watanabe [Sun, 25 Jun 2023 06:59:49 +0000 (15:59 +0900)]
meson: move declarations of several generators
Yu Watanabe [Sun, 25 Jun 2023 06:57:47 +0000 (15:57 +0900)]
meson: move declarations of cryptsetup and friends
Yu Watanabe [Sun, 25 Jun 2023 06:55:33 +0000 (15:55 +0900)]
meson: move declarations of backlight, rfkill, and sysupdate-generator
Yu Watanabe [Sun, 25 Jun 2023 06:51:14 +0000 (15:51 +0900)]
meson: move declarations of homed and friends
Yu Watanabe [Sun, 25 Jun 2023 06:50:36 +0000 (15:50 +0900)]
meson: move declarations of userdbd and friends
Yu Watanabe [Sun, 25 Jun 2023 06:49:43 +0000 (15:49 +0900)]
meson: move declaration of sysext
Yu Watanabe [Sun, 25 Jun 2023 06:48:28 +0000 (15:48 +0900)]
meson: move declarations of portabled and friends
Yu Watanabe [Sun, 25 Jun 2023 06:44:30 +0000 (15:44 +0900)]
meson: move declaration of systemctl
Yu Watanabe [Mon, 31 Jul 2023 20:48:27 +0000 (05:48 +0900)]
Merge pull request #28606 from DaanDeMeyer/kernel-install
Kernel install fixes
Yu Watanabe [Mon, 31 Jul 2023 20:46:08 +0000 (05:46 +0900)]
Merge pull request #28605 from yuwata/meson-use-template
meson: use template (part2)
Daan De Meyer [Mon, 31 Jul 2023 18:58:31 +0000 (20:58 +0200)]
kernel-install: Make sure KERNEL_INSTALL_BYPASS is disabled in tests
Daan De Meyer [Mon, 31 Jul 2023 18:56:14 +0000 (20:56 +0200)]
kernel-install: Only bypass "add" and "remove"
KERNEL_INSTALL_BYPASS should only bypass verbs that actually change
the system, not harmless verbs such as "inspect".
Yu Watanabe [Mon, 31 Jul 2023 17:39:13 +0000 (02:39 +0900)]
Yu Watanabe [Sun, 25 Jun 2023 06:42:23 +0000 (15:42 +0900)]
meson: move declaration of socket-activate
Yu Watanabe [Sun, 25 Jun 2023 06:41:42 +0000 (15:41 +0900)]
meson: move declarations of bootctl and friends
This also drops unnecessary dependency on libblkid from
systemd-boot-check-no-failures.
Yu Watanabe [Sun, 25 Jun 2023 06:39:45 +0000 (15:39 +0900)]
meson: move declaration of user-sessions
Yu Watanabe [Sun, 25 Jun 2023 06:38:19 +0000 (15:38 +0900)]
meson: move declarations of logind and friends
Yu Watanabe [Sun, 25 Jun 2023 06:36:27 +0000 (15:36 +0900)]
meson: move declarations of resolved and friends
Yu Watanabe [Sun, 25 Jun 2023 06:34:09 +0000 (15:34 +0900)]
meson: move declarations of dissect and friends
Yu Watanabe [Sun, 25 Jun 2023 06:31:38 +0000 (15:31 +0900)]
meson: move declarations of hibernate-resume
Yu Watanabe [Sun, 25 Jun 2023 06:20:29 +0000 (15:20 +0900)]
meson: move declarations of several generators
Yu Watanabe [Sun, 25 Jun 2023 06:16:57 +0000 (15:16 +0900)]
meson: move declarations of journald and friends
Yu Watanabe [Sun, 25 Jun 2023 06:15:56 +0000 (15:15 +0900)]
meson: move declaration of systemd-analyze
Frantisek Sumsal [Mon, 31 Jul 2023 14:29:39 +0000 (16:29 +0200)]
resolvectl: initialize the server state
Since not all fields of the dispatch table are mandatory we might end up
reading garbage if the optional field is not set.
In CIs we were lucky enough (or probably unfortunate enough) that the
garbage was printable, but in other cases the `show-server-state` verb
would just fail with:
$ resolvectl show-server-state
Failed to print table: Invalid argument
Follow-up to
bc837621a38 .
Yu Watanabe [Mon, 31 Jul 2023 17:22:15 +0000 (02:22 +0900)]
Merge pull request #28153 from yuwata/meson-use-template
meson: use template to declare executables and modules
Yu Watanabe [Mon, 31 Jul 2023 17:14:19 +0000 (02:14 +0900)]
Merge pull request #28568 from yuwata/network-address-next
network: bunch of cleanups and fixes for addressing
Yu Watanabe [Mon, 31 Jul 2023 14:50:17 +0000 (23:50 +0900)]
fstab-util: use pointer returned by startswith()
Yu Watanabe [Mon, 31 Jul 2023 17:12:05 +0000 (02:12 +0900)]
Merge pull request #28577 from yuwata/udev-split-files
udev: split files
Yu Watanabe [Mon, 31 Jul 2023 14:41:12 +0000 (23:41 +0900)]
test: update comment to make it consistent with the condition
Follow-up for
6425dec88b9dedf53d12a970339ab88f948c201a .
Luca Boccassi [Mon, 31 Jul 2023 14:37:59 +0000 (15:37 +0100)]
Merge pull request #28599 from keszybz/two-compilation-fixes
Two compilation fixes
Yu Watanabe [Tue, 18 Jul 2023 21:58:19 +0000 (06:58 +0900)]
udev: move declaration of ResolveNameTiming to udev-rules.c
It is only used by udevd and udevadm, not necessary in src/shared.
This also moves UDEV_NAME_SIZE and friends.
Yu Watanabe [Tue, 18 Jul 2023 21:44:37 +0000 (06:44 +0900)]
udev: move udev_parse_config_full() to udevd.c
Then, rename it to manager_parse_udev_config().
No functional change, just refactoring.
Yu Watanabe [Tue, 18 Jul 2023 20:37:35 +0000 (05:37 +0900)]
udev: rename test-udevd.c -> test-udev-manager.c
Yu Watanabe [Tue, 18 Jul 2023 20:17:03 +0000 (05:17 +0900)]
udev: split udevd.c into two
Yu Watanabe [Tue, 18 Jul 2023 20:15:57 +0000 (05:15 +0900)]
udev: move arg_xyz into Manager
No functional changes, just preparation for later commits.
Yu Watanabe [Tue, 18 Jul 2023 18:16:38 +0000 (03:16 +0900)]
udev: drop mostly unused Manager.pid
It is only used by the assertion in event_queue_insert().
We have similar check e.g. in sd-bus or sd-event, but udevd.c is not a
library code, hence such check is not necessary.
Yu Watanabe [Tue, 18 Jul 2023 18:09:12 +0000 (03:09 +0900)]
udev: merge manager_clear_for_worker() with manager_free()
The function manager_clear_for_worker() is now not called by workers,
and only called from manager_free(). Let's merge them.
This also drops unused Manager.rtnl, and outdated comment in
event_free().
Yu Watanabe [Tue, 18 Jul 2023 17:11:16 +0000 (02:11 +0900)]
udev: split-out worker code from udevd.c
While doing that, the Manager object allocated by the main process
is now _not_ freed in the spawned worker process, to follow our usual
coding style. See discussion in #24043.
Yu Watanabe [Tue, 18 Jul 2023 07:10:36 +0000 (16:10 +0900)]
udev: move several functions from udev-util.c to relevant udevd source files
The functions are only used by udevd (and relevant tests), hence it is
not necessary to be in src/shared.
Yu Watanabe [Tue, 18 Jul 2023 14:39:04 +0000 (23:39 +0900)]
udev: rename test-udev-event.c -> test-udev-spawn.c
Yu Watanabe [Tue, 18 Jul 2023 14:10:41 +0000 (23:10 +0900)]
udev: split-out formatter and spawning commands from udev-event.c
No functional changes, just refactoring.
Yu Watanabe [Tue, 18 Jul 2023 14:10:32 +0000 (23:10 +0900)]
udev: move DEVICE_TRACE() to udev-trace.h
It is only used by udevd, and not necessary in src/shared.
Yu Watanabe [Tue, 18 Jul 2023 14:12:52 +0000 (23:12 +0900)]
meson: sort files
Yu Watanabe [Tue, 18 Jul 2023 06:55:12 +0000 (15:55 +0900)]
udev-util: drop udev_queue_init() from shared
It is only used in libudev, let's move it.
Yu Watanabe [Sun, 25 Jun 2023 06:13:25 +0000 (15:13 +0900)]
meson: move declaration of PID1
Yu Watanabe [Fri, 23 Jun 2023 02:28:22 +0000 (11:28 +0900)]
meson: move declarations of nss modules
Yu Watanabe [Fri, 23 Jun 2023 02:21:40 +0000 (11:21 +0900)]
meson: move declaration of cryptsetup token modules
Yu Watanabe [Fri, 23 Jun 2023 02:09:10 +0000 (11:09 +0900)]
meson: introduce infra to build executables and shared libraries by using dictionary
That is not used yet. It will be used later.
Yu Watanabe [Fri, 23 Jun 2023 02:00:17 +0000 (11:00 +0900)]
meson: move declarations of arrays
Yu Watanabe [Mon, 31 Jul 2023 13:11:51 +0000 (22:11 +0900)]
resolve: initialize 'current' when SD_RESOLVED_NO_STALE is set
Otherwise, the check below is always fail.
```
if (FLAGS_SET(query_flags, SD_RESOLVED_NO_STALE) && j->until_valid < current)
```
Follow-up for
5ed91481abea382dc486507556e5cdf0f36b796f .
Zbigniew Jędrzejewski-Szmek [Mon, 31 Jul 2023 12:12:36 +0000 (14:12 +0200)]
tests: skip static asserts on old clang versions
We declare clang >= 10 is supported. The workaround is easy enough, so let's
just do that. Fixes #28598. With Debian clang version 11.0.1-2:
[267/384] Compiling C object test-bitfield.p/src_test_test-bitfield.c.o
FAILED: test-bitfield.p/src_test_test-bitfield.c.o
clang -Itest-bitfield.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Warray-bounds -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=undef -Wfloat-equal -Winit-self -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wunused-function -Wwrite-strings '-Wno-error=#warnings' -Wno-string-plus-int -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Wno-typedef-redefinition -Wno-gnu-variable-sized-type-not-at-end -Werror=shadow -fno-strict-aliasing -fvisibility=hidden -fno-omit-frame-pointer -include config.h -DTEST_CODE=1 -MD -MQ test-bitfield.p/src_test_test-bitfield.c.o -MF test-bitfield.p/src_test_test-bitfield.c.o.d -o test-bitfield.p/src_test_test-bitfield.c.o -c ../src/test/test-bitfield.c
../src/test/test-bitfield.c:216:9: error: static_assert failed due to requirement '__builtin_constant_p(({
static_assert(sizeof(unsigned char) <= sizeof(unsigned long long), "sizeof(uint8_t) <= sizeof(unsigned long long)");
static_assert(__builtin_choose_expr(__builtin_constant_p(1), 1, 0) < (int)(sizeof(unsigned char) * 8), "__builtin_choose_expr(__builtin_constant_p(1), 1, 0) < (int)(sizeof(uint8_t) * 8)");
__builtin_choose_expr(__builtin_constant_p(1), ((unsigned char)1) << (1), ({
int __unique_prefix__i751 = (1);
do {
if ((__builtin_expect(!!(!(__unique_prefix__i751 < (int)sizeof(unsigned char) * 8)), 0)))
log_assert_failed("UNIQ_T(_i, 751) < (int)sizeof(uint8_t) * 8", (&"../src/test/test-bitfield.c"[(sizeof ("..") - sizeof(const char)) + 1]), 216, __func__);
} while (0);
((unsigned char)1) << __unique_prefix__i751;
}));
}))' "__builtin_constant_p(INDEX_TO_MASK(uint8_t, 1))"
assert_cc(__builtin_constant_p(INDEX_TO_MASK(uint8_t, 1)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fundamental/macro-fundamental.h:109:25: note: expanded from macro 'assert_cc'
^ ~~~~
/usr/include/assert.h:143:24: note: expanded from macro 'static_assert'
^
...
Zbigniew Jędrzejewski-Szmek [Mon, 31 Jul 2023 12:04:55 +0000 (14:04 +0200)]
gpt-auto-generator: fix warnings about unused func when !ENABLE_EFI
Luca Boccassi [Mon, 31 Jul 2023 10:11:11 +0000 (11:11 +0100)]
Merge pull request #28596 from keszybz/doc-updates
Two documentation updates
Zbigniew Jędrzejewski-Szmek [Sun, 30 Jul 2023 10:11:33 +0000 (12:11 +0200)]
man/systemd.service: advise Type=exec instead of Type=simple
The descriptions of various options are reworked: first say what protocol
actually is, i.e. describe what type of notification the manager waits
for. Only after that describe various steps and things the service should
do. Also, apply some paragraph breaks.
Instead of recommending Type=simple, recommend Type=exec. Say explicitly that
Type=simple, Type=forking are not recommended. Type=simple ignores failure in a
way that doesn't make any sense except as a historical accident. We introduced
'exec' instead of changing 'simple' to keep backwards-compatiblity, but
'simple' is not very useful. 'forking' works, but is inefficient: correctly
programming the interface requires a lot of work, and at runtime, the
additional one or two forks are just a waste of CPU resources. Furthermore, we
now understand that because of COW traps, they may also increase memory
requirements. There is really no reason to use 'forking', except if it's
already implemented and the code cannot be changed to use 'notify'.
Also, remove the recommendations to use Type=simple to avoid delaying boot. In
most cases, if the service can support notifications about startup, those
should be done.
Overall, for new services, "notify", "notify-reload", and "dbus" are the
types that make sense.
Yu Watanabe [Tue, 11 Jul 2023 02:24:06 +0000 (11:24 +0900)]
network/address: rename address_kernel_{compare,hash}_func() -> address_{compare,hash}_func()
Previously, we had two compare/hash functions. But we do not have
one of them anymore. Let's rename them.
Yu Watanabe [Tue, 11 Jul 2023 02:22:35 +0000 (11:22 +0900)]
network/address: drop unused functions
Yu Watanabe [Mon, 31 Jul 2023 08:52:09 +0000 (17:52 +0900)]
test-network: add more tests for address properties
Yu Watanabe [Tue, 11 Jul 2023 02:21:30 +0000 (11:21 +0900)]
network/address: check if existing addresses can be updated in more detail
Some properties of address can be updated, but some cannot.
On reconfiguring an interface or restarting networkd, let's keep an
assigned address only when it can be updated later with the requested
setting, and otherwise drop it.
Yu Watanabe [Mon, 31 Jul 2023 09:07:46 +0000 (18:07 +0900)]
network/address: always set IFA_ADDRESS attribute for IPv6 address on configure
IPv6 address can update the peer address without removing the address.
If an address have a peer, but now we want to drop the peer, we need to
specify a null address in IFA_ADDRESS attribute.
IPv4 address cannot update the peer address, so let's specify peer
address only when necessary.
Yu Watanabe [Mon, 31 Jul 2023 09:04:14 +0000 (18:04 +0900)]
network/address: make Label= accept an empty string
We usually reset setting when an emptry string is specified.
Yu Watanabe [Mon, 31 Jul 2023 09:03:40 +0000 (18:03 +0900)]
network/address: add missing space in log message
Yu Watanabe [Mon, 31 Jul 2023 09:01:58 +0000 (18:01 +0900)]
network/address: do not set configuring flag when a request is canceled
Fixes copy-and-paste error.
Follow-up for
0a0c2672dbd22dc85d660e5baa7e1bef701beb88 .
Zbigniew Jędrzejewski-Szmek [Sat, 29 Jul 2023 17:29:33 +0000 (19:29 +0200)]
systemd-battery-check: provide more debug logs
The logs would give no hint about the answer to most interesting question: why
we decided to return true or false from the program. If we find batteries
that are low or uncertain, log at info level.