]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agosd-id128: use /proc/device-tree 21273/head
Yu Watanabe [Tue, 9 Nov 2021 01:31:17 +0000 (10:31 +0900)] 
sd-id128: use /proc/device-tree

4 years agocondition: use /proc/device-tree/
Yu Watanabe [Tue, 9 Nov 2021 01:28:43 +0000 (10:28 +0900)] 
condition: use /proc/device-tree/

4 years agohostnamed: use /proc/device-tree to get chassis type
Yu Watanabe [Tue, 9 Nov 2021 01:21:23 +0000 (10:21 +0900)] 
hostnamed: use /proc/device-tree to get chassis type

From https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-firmware-ofw
---
Userspace must not use the /sys/firmware/devicetree/base
path directly, but instead should follow /proc/device-tree
symlink. It is possible that the absolute path will change
in the future, but the symlink is the stable ABI.
---

Addresses the comment https://github.com/systemd/systemd/pull/20731#discussion_r744095262.

4 years agoMerge pull request #21290 from poettering/arch-me-harder
Luca Boccassi [Wed, 10 Nov 2021 18:37:01 +0000 (18:37 +0000)] 
Merge pull request #21290 from poettering/arch-me-harder

some docs/tweaks regarding porting to new archs

4 years agomeson: Rework gnu-efi detection
Jan Janssen [Mon, 8 Nov 2021 12:04:45 +0000 (13:04 +0100)] 
meson: Rework gnu-efi detection

Moving all of the gnu-efi detection into src/boot/efi/meson.build makes
more sense than having it partially split.

And thanks to subdir_done() we can simplify the code a lot.

Fixes: #21258
4 years agoMerge pull request #21293 from mrc0mmand/ci-cancel-old-jobs
Luca Boccassi [Wed, 10 Nov 2021 18:15:21 +0000 (18:15 +0000)] 
Merge pull request #21293 from mrc0mmand/ci-cancel-old-jobs

ci: cancel previous jobs on ref update

4 years agoci: cancel previous jobs on ref update 21293/head
Frantisek Sumsal [Wed, 10 Nov 2021 15:45:12 +0000 (16:45 +0100)] 
ci: cancel previous jobs on ref update

Let's save the environment (and reduce the number of jobs in GH Actions
queues) by cancelling old jobs on a ref update (force push).

See: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency

4 years agoci: fix indentation
Frantisek Sumsal [Wed, 10 Nov 2021 15:42:07 +0000 (16:42 +0100)] 
ci: fix indentation

4 years agoRevert "CI: run GCC unit test job on push to main"
Frantisek Sumsal [Wed, 10 Nov 2021 16:15:00 +0000 (17:15 +0100)] 
Revert "CI: run GCC unit test job on push to main"

This reverts commit c1036042f5aa3369d771776fb6d57fac2543d80d.

Follow-up to 0ad536c16a940b4557322f3f811db73c4b374898.

4 years agodoc: add some docs with a checklist of what to do for new architectures 21290/head
Lennart Poettering [Wed, 10 Nov 2021 11:37:47 +0000 (12:37 +0100)] 
doc: add some docs with a checklist of what to do for new architectures

4 years agoshared: nudge people into sending us patches to make /lib64/ symlink generation work...
Lennart Poettering [Wed, 10 Nov 2021 11:35:27 +0000 (12:35 +0100)] 
shared: nudge people into sending us patches to make /lib64/ symlink generation work on all archs that need it

This is an attempt to nudge people into sending us patches that fix
bug #14311 for us, given that the original submitter lost interest.

4 years agodocs: invite people to define GPT partition types for all archs now
Lennart Poettering [Wed, 10 Nov 2021 11:32:28 +0000 (12:32 +0100)] 
docs: invite people to define GPT partition types for all archs now

The discovery partitions spec so far suggested we should define
arch-specific partition type uuids only for archs that have EFI. Let's
change that and invite people to define them for any arch. Why? Even if
GPT is defined as part of the UEFI spec it's quite useful independently
of it, too. Specifically, our image dissection logic makes use of it,
i.e. systemd-nspawn, systemd-gpt-auto-generator, systemd-repart,
RootImage=, portable services, and so on. None of these tools are
related to UEFI in any way.

Hence, let's open this up.

4 years agoshared: start pushing people gently to define GPT partition type UUIDs for missing...
Lennart Poettering [Wed, 10 Nov 2021 11:27:26 +0000 (12:27 +0100)] 
shared: start pushing people gently to define GPT partition type UUIDs for missing archs

Let's generate a single gcc `#warning`  message asking people to define
partition type UUIDs for their architectures if they are missing.

4 years agoarchitecture: drop __riscv__ checks, it's obsolete since 2018
Lennart Poettering [Wed, 10 Nov 2021 11:25:03 +0000 (12:25 +0100)] 
architecture: drop __riscv__ checks, it's obsolete since 2018

4 years agofsck: no emergency.target on nofail mounts
Scott Lamb [Wed, 21 Jul 2021 17:03:49 +0000 (10:03 -0700)] 
fsck: no emergency.target on nofail mounts

Also describe failure behavior more precisely in the manpage.
Fixes #20237.

4 years agocore: replace slice dependencies as they get added
Anita Zhang [Tue, 9 Nov 2021 23:26:28 +0000 (15:26 -0800)] 
core: replace slice dependencies as they get added

Defines a "UNIT_DEPENDENCY_SLICE_PROPERTY" UnitDependencyMask type that
is used when adding slices to the dependencies hashmap. This type is
used to remove slice dependencies when they get overridden by new ones.

Fixes #20182

4 years agoMerge pull request #21287 from yuwata/man-network-condition
Zbigniew Jędrzejewski-Szmek [Wed, 10 Nov 2021 09:36:54 +0000 (10:36 +0100)] 
Merge pull request #21287 from yuwata/man-network-condition

man: cleanups for [Match] section

4 years agonetwork: cake: fix copy-and-paste error
Yu Watanabe [Wed, 10 Nov 2021 01:32:52 +0000 (10:32 +0900)] 
network: cake: fix copy-and-paste error

Follow-up for 35896db4895f68050c3edd2c58b913dcba4e0fd8.

Fixes CID#1465796.

4 years agoman: use include directive for [Match] section 21287/head
Yu Watanabe [Wed, 10 Nov 2021 01:57:18 +0000 (10:57 +0900)] 
man: use include directive for [Match] section

4 years agoman: add missing Firmware= setting
Yu Watanabe [Wed, 10 Nov 2021 01:56:42 +0000 (10:56 +0900)] 
man: add missing Firmware= setting

4 years agoMerge pull request #21276 from yuwata/ether-addr-util
Yu Watanabe [Wed, 10 Nov 2021 00:22:01 +0000 (09:22 +0900)] 
Merge pull request #21276 from yuwata/ether-addr-util

ether-addr-util: introduce parse_hw_addr() and related conf parsers

4 years agoMerge pull request #21281 from poettering/repart-align-fixes
Yu Watanabe [Wed, 10 Nov 2021 00:21:24 +0000 (09:21 +0900)] 
Merge pull request #21281 from poettering/repart-align-fixes

repart: fixes when operating on unaligned partitions

4 years agoMerge pull request #21283 from poettering/nspawn-idempotent-empty-settings
Lennart Poettering [Tue, 9 Nov 2021 21:20:22 +0000 (22:20 +0100)] 
Merge pull request #21283 from poettering/nspawn-idempotent-empty-settings

nspawn: make empty settings files true NOPs

4 years agoanalyze: basename -> path_extract_filename and other minor fixes
Albert Brox [Tue, 9 Nov 2021 14:30:56 +0000 (09:30 -0500)] 
analyze: basename -> path_extract_filename and other minor fixes

4 years agonspawn: don't muck with caps if no network setting is used in settings file 21283/head
Lennart Poettering [Tue, 9 Nov 2021 17:27:40 +0000 (18:27 +0100)] 
nspawn: don't muck with caps if no network setting is used in settings file

Our goal here (as in the previous commits) is to ensure that a settings
file loaded in --settings=override mode is truly a NOP. Previously this
was not the case as we'd drop CAP_NET_ADMIN from the caps if the
settings file didn't enable networking.

With this change we'll drop it only if explicitly turned off in the
settings file, and otherwise let the built-in defaults and cmdline
params reign supreme as documented.

Fixes: #20055
4 years agonspawn: only copy syscall filters from settings if actually configured
Lennart Poettering [Tue, 9 Nov 2021 17:26:53 +0000 (18:26 +0100)] 
nspawn: only copy syscall filters from settings if actually configured

As in the previous commit, let's not copy settings that aren#t
configured, so that --settings=override with an empty .nspawn file is
truly a NOP.

4 years agonspawn: copy BindUser= setting from settings only if set
Lennart Poettering [Tue, 9 Nov 2021 17:25:42 +0000 (18:25 +0100)] 
nspawn: copy BindUser= setting from settings only if set

Let's only pick this up from the settings if actually set.

As in the previous commit this makes sure that an empty settings file in
--settings=override mode is really a NOP.

4 years agonspawn: use three boolean fields from settings file when actually set
Lennart Poettering [Tue, 9 Nov 2021 17:23:36 +0000 (18:23 +0100)] 
nspawn: use three boolean fields from settings file when actually set

Let's turn these three fields into tristates, so that we can distinguish
whether they are not configured at all from explicitly turned off.

Let#s then use this to ensure that we only copy the settings fields into
our execution environment if they are actually configured.

We already do this for some of the boolean settings, this adds it for
the missing ones.

The goal here is to ensure that an empty settings file used in
--settings=override mode (i.e. the default mode used in the
systemd-nspawn@.service unit) is truly a NOP.

4 years agonspawn: add helper settings_network_configured()
Lennart Poettering [Tue, 9 Nov 2021 17:21:15 +0000 (18:21 +0100)] 
nspawn: add helper settings_network_configured()

The new helper returns whether the settings file had *any* networking
setting configured at all. We already have a similar helper
settings_private_network() which returns a similar result. The
difference is that the new helper will return true when the private
network was explicitly turned off, while the old one will only return
true if configured and enabled.

We'll reuse the helper a 2nd time later on, but even without it it makes
things a bit more readable.

4 years agodocs: Clarify systemctl show manual
Paulo Neves [Tue, 9 Nov 2021 14:06:01 +0000 (15:06 +0100)] 
docs: Clarify systemctl show manual

The manual incorrectly asserted that the properties in systemctl show
matched the the options in systemd-system.conf, which is not always true.

Add clarification on the equivalence of the properties in systemctl show
and systemd-system.conf

Fixed #21230

4 years agonspawn: drop two entirely redundant lines
Lennart Poettering [Tue, 9 Nov 2021 17:25:17 +0000 (18:25 +0100)] 
nspawn: drop two entirely redundant lines

4 years agoMerge pull request #21270 from poettering/event-mem-corruption
Lennart Poettering [Tue, 9 Nov 2021 15:54:25 +0000 (16:54 +0100)] 
Merge pull request #21270 from poettering/event-mem-corruption

sd-event: fix memory corruption

4 years agotest: extend repart test suite to test for unaligned partitions 21281/head
Lennart Poettering [Tue, 9 Nov 2021 15:53:11 +0000 (16:53 +0100)] 
test: extend repart test suite to test for unaligned partitions

4 years agorepart: fix free area calculations for unaligned partitions
Lennart Poettering [Tue, 9 Nov 2021 15:31:48 +0000 (16:31 +0100)] 
repart: fix free area calculations for unaligned partitions

To properly detect how much space we have to distribute we need to take
into account that both the partition offset and the partition size
aren't aligned.

4 years agorepart: don't distribute space after unaligned partitions
Lennart Poettering [Tue, 9 Nov 2021 15:25:24 +0000 (16:25 +0100)] 
repart: don't distribute space after unaligned partitions

If we operate on a disk that has a pre-existing unaligned partition
(i.e. one that doesn't start on multiple of 4K, or doesn't have a size
of multiple 4K), then the amount of space after it to distribute among
partitions isn't a multiple of 4K either.  So far we might end up
passing the remaining fraction to any partition that wanted it, which
was usually the first one after it that is newly defined. This then
confused the later placement algorithm, since it assumed all partitions
we newly allocate were properly aligned but by being extended by the
fractional space they wouldn't be anymore.

Let's hence fix that by ensuring we never pass space to later partitions
so that things wouldn't be aligned anymore.

Anything that is left-over then at the very end (i.e. typically exactly
the remaining fraction) is added as padding to the existing, unaligned
partition, so that it can't confuse anyone.

Fixes: #20622
4 years agorepart: simplify stat machine we mostly go through linearly
Lennart Poettering [Tue, 9 Nov 2021 15:25:00 +0000 (16:25 +0100)] 
repart: simplify stat machine we mostly go through linearly

4 years agorepart: use LESS_BY() more
Lennart Poettering [Tue, 9 Nov 2021 15:24:22 +0000 (16:24 +0100)] 
repart: use LESS_BY() more

4 years agoconf-parser: introduce config_parse_hw_addr() and config_parse_hw_addrs() 21276/head
Yu Watanabe [Thu, 4 Nov 2021 16:34:11 +0000 (01:34 +0900)] 
conf-parser: introduce config_parse_hw_addr() and config_parse_hw_addrs()

4 years agoether-addr-util: introduce {hw,ether}_addr_hash_ops_free
Yu Watanabe [Thu, 4 Nov 2021 16:33:25 +0000 (01:33 +0900)] 
ether-addr-util: introduce {hw,ether}_addr_hash_ops_free

4 years agoconf-parser: rename config_parse_hwaddr() -> config_parse_ether_addr()
Yu Watanabe [Thu, 4 Nov 2021 16:12:45 +0000 (01:12 +0900)] 
conf-parser: rename config_parse_hwaddr() -> config_parse_ether_addr()

4 years agoether-addr-util: replace ether_addr_from_string() with parse_ether_addr()
Yu Watanabe [Thu, 4 Nov 2021 15:19:10 +0000 (00:19 +0900)] 
ether-addr-util: replace ether_addr_from_string() with parse_ether_addr()

4 years agoether-addr-util: introduce parse_ether_addr()
Yu Watanabe [Thu, 4 Nov 2021 15:15:44 +0000 (00:15 +0900)] 
ether-addr-util: introduce parse_ether_addr()

4 years agotest: add tests for parse_hw_addr()
Yu Watanabe [Thu, 4 Nov 2021 15:11:09 +0000 (00:11 +0900)] 
test: add tests for parse_hw_addr()

4 years agoether-addr-util: introduce parse_hw_addr()
Yu Watanabe [Thu, 4 Nov 2021 10:18:32 +0000 (19:18 +0900)] 
ether-addr-util: introduce parse_hw_addr()

4 years agotest: add test case for self-destroy inotify handler 21270/head
Lennart Poettering [Mon, 8 Nov 2021 23:15:43 +0000 (00:15 +0100)] 
test: add test case for self-destroy inotify handler

4 years agosd-event: add sd_event_add_inotify_fd() call
Lennart Poettering [Mon, 8 Nov 2021 23:10:58 +0000 (00:10 +0100)] 
sd-event: add sd_event_add_inotify_fd() call

sd_event_add_inotify_fd() is like sd_event_add_inotify(), but takes an
fd to an inode instead of a path, and is hence a ton nicer.

4 years agosd-event: don't destroy inotify data structures from inotify event handler
Lennart Poettering [Mon, 8 Nov 2021 23:11:38 +0000 (00:11 +0100)] 
sd-event: don't destroy inotify data structures from inotify event handler

This fixes a bad memory access when we destroy an inotify source handler
from the handler itself, and thus destroy the associated inotify_data
structures.

Fixes: #20177
4 years agologind: downgrade message about /run/utmp missing to LOG_DEBUG
Lennart Poettering [Mon, 8 Nov 2021 22:08:13 +0000 (23:08 +0100)] 
logind: downgrade message about /run/utmp missing to LOG_DEBUG

This isn't really anything to really complain about, let's debug log
about this, and continue quietly as if utmp was empty.

4 years agotree-wide: use sd_event_source_disable_unref() where we can
Lennart Poettering [Mon, 8 Nov 2021 22:07:51 +0000 (23:07 +0100)] 
tree-wide: use sd_event_source_disable_unref() where we can

4 years agoinotify-util: improve reported error codes when inotify_add_watch() fails
Lennart Poettering [Tue, 9 Nov 2021 11:40:39 +0000 (12:40 +0100)] 
inotify-util: improve reported error codes when inotify_add_watch() fails

4 years agoRevert "CI: disable opensuse mkosi CI"
Michal Koutný [Thu, 4 Nov 2021 14:38:24 +0000 (15:38 +0100)] 
Revert "CI: disable opensuse mkosi CI"

This reverts commit ab6df5208396b7069d5c12aa9c21b8ecdb689de1.

The image build failed during kernel RPM installation (bug in %post
scriptlet). This has been fixed in the package suse-module-tools 16.0.13
[1]. The fix is in openSUSE Tumbleweed repos so the tests can be enabled
again.

[1] https://github.com/openSUSE/suse-module-tools/pull/53

Fixes: #21019
4 years agoMerge pull request #21269 from yuwata/network-netdev-cleanups
Yu Watanabe [Tue, 9 Nov 2021 10:08:11 +0000 (19:08 +0900)] 
Merge pull request #21269 from yuwata/network-netdev-cleanups

network/netdev: several trivial cleanups

4 years agoMerge pull request #21271 from yuwata/ether-addr-util-helper-functions
Zbigniew Jędrzejewski-Szmek [Tue, 9 Nov 2021 09:02:55 +0000 (10:02 +0100)] 
Merge pull request #21271 from yuwata/ether-addr-util-helper-functions

ether-addr-util: introduce several helper functions

4 years agoMerge pull request #21272 from yuwata/netif-util-split
Zbigniew Jędrzejewski-Szmek [Tue, 9 Nov 2021 09:01:07 +0000 (10:01 +0100)] 
Merge pull request #21272 from yuwata/netif-util-split

netif-util: move several functions from network-util.c to netif-util.c

4 years agoarp-util: drop redundant line
Yu Watanabe [Tue, 9 Nov 2021 01:33:57 +0000 (10:33 +0900)] 
arp-util: drop redundant line

The client's IP address is already loaded to X.
(The comment of the dropped line is wrong, X instead of A.)

4 years agonetwork/netdev: sort netdev kinds 21269/head
Yu Watanabe [Sun, 7 Nov 2021 20:50:16 +0000 (05:50 +0900)] 
network/netdev: sort netdev kinds

4 years agonetwork/bridge: drop if_bridge.h from bridge.h
Yu Watanabe [Mon, 8 Nov 2021 00:51:20 +0000 (09:51 +0900)] 
network/bridge: drop if_bridge.h from bridge.h

To avoid future header conflicts.

4 years agonetwork/netdev: fix typo
Yu Watanabe [Sun, 7 Nov 2021 21:35:04 +0000 (06:35 +0900)] 
network/netdev: fix typo

4 years agonetwork: bareudp: use fill_message_create
Yu Watanabe [Sat, 6 Nov 2021 03:58:01 +0000 (12:58 +0900)] 
network: bareudp: use fill_message_create

4 years agonetwork: geneve: use fill_message_create
Yu Watanabe [Sat, 6 Nov 2021 03:40:29 +0000 (12:40 +0900)] 
network: geneve: use fill_message_create

4 years agonetwork/netdev: update comment
Yu Watanabe [Sat, 6 Nov 2021 03:57:54 +0000 (12:57 +0900)] 
network/netdev: update comment

4 years agonetwork/netdev: reduce indentation
Yu Watanabe [Sat, 6 Nov 2021 03:44:30 +0000 (12:44 +0900)] 
network/netdev: reduce indentation

4 years agoMerge pull request #21226 from yuwata/network-tc-cake
Yu Watanabe [Tue, 9 Nov 2021 05:18:41 +0000 (14:18 +0900)] 
Merge pull request #21226 from yuwata/network-tc-cake

network: add several CAKE settings

4 years agoMerge pull request #21268 from yuwata/network-ndisc-use-gateway
Yu Watanabe [Tue, 9 Nov 2021 02:33:21 +0000 (11:33 +0900)] 
Merge pull request #21268 from yuwata/network-ndisc-use-gateway

network: ndisc: introduce UseGateway= and UseRoutePrefix=

4 years agotest-network: add testcases for CAKE settings 21226/head
Yu Watanabe [Wed, 3 Nov 2021 20:50:42 +0000 (05:50 +0900)] 
test-network: add testcases for CAKE settings

4 years agonetwork: tc/cake: introduce UseRawPacketSize= setting
Yu Watanabe [Thu, 4 Nov 2021 01:04:47 +0000 (10:04 +0900)] 
network: tc/cake: introduce UseRawPacketSize= setting

4 years agonetwork: tc/cake: introduce SplitGSO= setting
Yu Watanabe [Wed, 3 Nov 2021 20:38:13 +0000 (05:38 +0900)] 
network: tc/cake: introduce SplitGSO= setting

4 years agonetwork: tc/cake: introduce Wash= setting
Yu Watanabe [Wed, 3 Nov 2021 20:32:44 +0000 (05:32 +0900)] 
network: tc/cake: introduce Wash= setting

4 years agonetwork: tc/cake: introduce FirewallMark= setting
Yu Watanabe [Wed, 3 Nov 2021 20:13:20 +0000 (05:13 +0900)] 
network: tc/cake: introduce FirewallMark= setting

4 years agonetwork: tc/cake: introduce PriorityQueueingProfile= setting
Yu Watanabe [Wed, 3 Nov 2021 19:59:37 +0000 (04:59 +0900)] 
network: tc/cake: introduce PriorityQueueingProfile= setting

4 years agonetwork: tc/cake: introduce MPUBytes= setting
Yu Watanabe [Wed, 3 Nov 2021 19:16:20 +0000 (04:16 +0900)] 
network: tc/cake: introduce MPUBytes= setting

4 years agonetwork: tc/cake: introduce NAT= setting
Yu Watanabe [Tue, 2 Nov 2021 20:55:54 +0000 (05:55 +0900)] 
network: tc/cake: introduce NAT= setting

4 years agonetwork: tc/cake: introduce FlowIsolationMode= setting
Yu Watanabe [Tue, 2 Nov 2021 20:48:15 +0000 (05:48 +0900)] 
network: tc/cake: introduce FlowIsolationMode= setting

4 years agonetwork: tc/cake: introduce CompensationMode= setting
Yu Watanabe [Tue, 2 Nov 2021 19:50:00 +0000 (04:50 +0900)] 
network: tc/cake: introduce CompensationMode= setting

4 years agonetwork: tc/cake: do not pass 0 if OverheadBytes= is not specified
Yu Watanabe [Tue, 2 Nov 2021 19:14:08 +0000 (04:14 +0900)] 
network: tc/cake: do not pass 0 if OverheadBytes= is not specified

4 years agonetwork: tc/cake: introduce AutoRateIngress= setting
Yu Watanabe [Tue, 2 Nov 2021 19:05:02 +0000 (04:05 +0900)] 
network: tc/cake: introduce AutoRateIngress= setting

4 years agoman: use "…" for specifying ranges
Yu Watanabe [Thu, 4 Nov 2021 00:20:21 +0000 (09:20 +0900)] 
man: use "…" for specifying ranges

4 years agoman: move Bandwidth= setting at the beginning of the [CAKE] section
Yu Watanabe [Tue, 2 Nov 2021 19:32:00 +0000 (04:32 +0900)] 
man: move Bandwidth= setting at the beginning of the [CAKE] section

For consistency with tc-cake(8).

4 years agosd-netlink: add more attributes for CAKE
Yu Watanabe [Tue, 2 Nov 2021 18:39:46 +0000 (03:39 +0900)] 
sd-netlink: add more attributes for CAKE

4 years agomeson: Add --warn-common and --fatal-warnings to link flags
Jan Janssen [Thu, 4 Nov 2021 18:03:45 +0000 (19:03 +0100)] 
meson: Add --warn-common and --fatal-warnings to link flags

4 years agonetif-util: split net_get_unique_predictable_data() into two 21272/head
Yu Watanabe [Mon, 8 Nov 2021 02:01:46 +0000 (11:01 +0900)] 
netif-util: split net_get_unique_predictable_data() into two

4 years agonetif-util: rename net_get_name_persistent() -> net_get_persistent_name()
Yu Watanabe [Mon, 8 Nov 2021 01:55:27 +0000 (10:55 +0900)] 
netif-util: rename net_get_name_persistent() -> net_get_persistent_name()

4 years agonetif-util: rename link_get_type_string() -> net_get_type_string()
Yu Watanabe [Sat, 6 Nov 2021 02:28:55 +0000 (11:28 +0900)] 
netif-util: rename link_get_type_string() -> net_get_type_string()

4 years agonetif-util: move several functions from network-util.[ch] to shared/netif-util.[ch]
Yu Watanabe [Sat, 6 Nov 2021 01:24:09 +0000 (10:24 +0900)] 
netif-util: move several functions from network-util.[ch] to shared/netif-util.[ch]

These functions are not relevant to sd-network, and only used by
networkd, networkctl, and udevd.

4 years agoarphrd-util: introduce arphrd_to_hw_addr_len()
Yu Watanabe [Sun, 7 Nov 2021 06:23:38 +0000 (15:23 +0900)] 
arphrd-util: introduce arphrd_to_hw_addr_len()

4 years agoarphrd-util: rename arphrd-list.[ch] -> arphrd-util.[ch]
Yu Watanabe [Sun, 7 Nov 2021 06:16:25 +0000 (15:16 +0900)] 
arphrd-util: rename arphrd-list.[ch] -> arphrd-util.[ch]

4 years agoether-addr-util: make hw_addr_is_null() return true also for all zero address 21271/head
Yu Watanabe [Sat, 6 Nov 2021 05:12:30 +0000 (14:12 +0900)] 
ether-addr-util: make hw_addr_is_null() return true also for all zero address

This fixes the following error:
---
systemd-networkd[1449490]: ip6tnl0: Saved hardware address: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
systemd-networkd[1449490]: ip6tnl0: Failed to manage link by its new hardware address, ignoring: File exists
---

4 years agoether-addr-util: introduce several helper functions
Yu Watanabe [Sat, 6 Nov 2021 03:15:12 +0000 (12:15 +0900)] 
ether-addr-util: introduce several helper functions

4 years agoMerge pull request #21265 from poettering/userdb-fixes
Yu Watanabe [Mon, 8 Nov 2021 23:14:52 +0000 (08:14 +0900)] 
Merge pull request #21265 from poettering/userdb-fixes

userdb: various userdb fixes and minor feature additions

4 years agonetwork: ndisc: introduce UseGateway= and UseRoutePrefix= settings 21268/head
Yu Watanabe [Mon, 8 Nov 2021 21:44:45 +0000 (06:44 +0900)] 
network: ndisc: introduce UseGateway= and UseRoutePrefix= settings

Closes #21263.

4 years agonetwork: ndisc: do not read DNSSL option when UseDomains=no
Yu Watanabe [Mon, 8 Nov 2021 21:27:21 +0000 (06:27 +0900)] 
network: ndisc: do not read DNSSL option when UseDomains=no

Previously, the following confing did not work:
```
[IPv6AcceptRA]
UseDNS=no
UseDomains=yes
```

4 years agonetwork: ndisc: split out prefix option handling into ndsic_router_process_prefix()
Yu Watanabe [Mon, 8 Nov 2021 21:26:29 +0000 (06:26 +0900)] 
network: ndisc: split out prefix option handling into ndsic_router_process_prefix()

4 years agoman: document new --json= mode 21265/head
Lennart Poettering [Mon, 8 Nov 2021 17:05:32 +0000 (18:05 +0100)] 
man: document new --json= mode

4 years agoman: document new --multipler= switch
Lennart Poettering [Mon, 8 Nov 2021 17:02:33 +0000 (18:02 +0100)] 
man: document new --multipler= switch

4 years agouserwork: make sure to return correct errors when service is not specified correctly
Lennart Poettering [Mon, 8 Nov 2021 16:57:42 +0000 (17:57 +0100)] 
userwork: make sure to return correct errors when service is not specified correctly

Fixes: #21215 #21222
4 years agouserdbctl: always show summary after printing table (unless legend is off)
Lennart Poettering [Mon, 8 Nov 2021 16:36:42 +0000 (17:36 +0100)] 
userdbctl: always show summary after printing table (unless legend is off)

We do this in many (most?) other tools, do so here too. It's quite
useful info to count users/groups/…

4 years agouserdbctl: add a switch for explicitly enabling/disabling multiplexer-based lookups
Lennart Poettering [Mon, 8 Nov 2021 16:27:26 +0000 (17:27 +0100)] 
userdbctl: add a switch for explicitly enabling/disabling multiplexer-based lookups

This is incredibly useful for debugging.

4 years agouserdbctl: make JSON output mode details configurable like in the other tools
Lennart Poettering [Mon, 8 Nov 2021 16:25:50 +0000 (17:25 +0100)] 
userdbctl: make JSON output mode details configurable like in the other tools

Let's add --json= with the same parser as in the other tools, and honour
it.

4 years agouserdbctl: explicitly handle ESRCH/ENOLINK from userdb_all()
Lennart Poettering [Mon, 8 Nov 2021 16:20:16 +0000 (17:20 +0100)] 
userdbctl: explicitly handle ESRCH/ENOLINK from userdb_all()

Similar in style to previous commit, let's handle these two errors
properly, i.e. as equivalent to no entries found. Let's debug log about
them, to make things either to deal with when debugging (after all
userdbctl to a large degree are debugging tools).

4 years agouserwork: properly handle ENOLINK error from lower-level userdb code
Lennart Poettering [Mon, 8 Nov 2021 15:43:07 +0000 (16:43 +0100)] 
userwork: properly handle ENOLINK error from lower-level userdb code

The lower-level userdb code will return ENOLINK if varlink lookups are
disabled explicitly and we couldn#t find an answer any other way. Let's
not propagate this to clients, since they don't have control over this
feature anyway: we decide internally when to disable varlink lookups
(e.g. if DropIn lookups are requested we disable them) and to the client
side that should not be visible: if we can't find a record with the
flags we pick then we should report then we can't find any, and that's
it.

Fixes: #21223