]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agotypes-fundamental: introduce sd_true + sd_false 21285/head
Lennart Poettering [Thu, 11 Nov 2021 14:31:17 +0000 (15:31 +0100)] 
types-fundamental: introduce sd_true + sd_false

I think we should stick to the rule that stuff defined in
types-fundamental.h either:

1. adds a prefixed concept "sd_xyz" that maps differently in the two
   environments

2. adds a non-prefixed concept "xyz" that adds a type otherwise missing
   in one of the two environments but with the same definition as in the
   other.

i.e. if have have some concept that might differ the way its set up in
the two environments it really should be prefixed by "sd_" to make clear
it has semantics we defined. Only drop the prefix if it really means the
exact same thin in all environments.

Now, sd_bool is defined prefixed, because its either mapped to "BOOLEAN"
(which is an integer) in UEFI or "bool" (which is C99 _Bool) in
userspace. size_t is not defined prefixed, because it's mapped to the
same thing ultimately (on the UEFI its mapped to UINTN, but that in turn
is defined as being the type for the size of memory objects, thus it's
really the same as userspace size_t).

So far "true" and "false" where defined unprefixed even though they map
to values of different types. typeof(true) in userspace would reveal
_Bool, but typeof(false) in UEFI would reveal BOOLEAN. The distinction
actually does matter in comparisons (i.e. (_Bool) 1 == (_Bool) 2 holds
while (BOOLEAN) 1 == (BOOLEAN) 2 does not hold).

Hence, let's add sd_true and sd_false, thus indicating we defined our
own concept here, and it has similar but different semantics in UEFI and
in userspace.

3 years agofundamental: rename type.h → types-fundamental.h
Lennart Poettering [Thu, 11 Nov 2021 14:29:53 +0000 (15:29 +0100)] 
fundamental: rename type.h → types-fundamental.h

"type.h" is a very generic name, but this header is very specific to
making the "fundaemtnal" stuff work, it maps genric types in two
distinct ways. Hence let's make clear in the header name already what
this is about.

3 years agoboot: line-break magic[] array to match osrel[] line breaks
Lennart Poettering [Thu, 11 Nov 2021 14:20:51 +0000 (15:20 +0100)] 
boot: line-break magic[] array to match osrel[] line breaks

3 years agobootspec: catch up with sd-boot's bootspec implementation
Lennart Poettering [Tue, 9 Nov 2021 22:58:08 +0000 (23:58 +0100)] 
bootspec: catch up with sd-boot's bootspec implementation

Let's parse the same fields and use them the same way as in sd-boot.

Fixes: #20093
3 years agoboot: when we can't boot use the right boot loader entry display title in log message
Lennart Poettering [Tue, 9 Nov 2021 22:57:49 +0000 (23:57 +0100)] 
boot: when we can't boot use the right boot loader entry display title in log message

3 years agoboot: clean up unified boot loader entry name/version extraction
Lennart Poettering [Tue, 9 Nov 2021 22:54:10 +0000 (23:54 +0100)] 
boot: clean up unified boot loader entry name/version extraction

Let's make sure IMAGE_ID/IMAGE_VERSION are properly honoured, and
explain in a long comment why.

Let's also use ID= field again, which was lost by accident.

(While we are at it do some minimal OOM checks wherever we touch
something)

3 years agobootspec: fix comment that says exactly the opposite of what is true
Lennart Poettering [Tue, 9 Nov 2021 22:51:35 +0000 (23:51 +0100)] 
bootspec: fix comment that says exactly the opposite of what is true

3 years agoboot: const arguments should be const
Lennart Poettering [Tue, 9 Nov 2021 22:49:01 +0000 (23:49 +0100)] 
boot: const arguments should be const

Unfortunately they forgot the "const" decoration on the MetaiMatch()
prototype, but let that omission not leak into our code, let's hide it
away in the innermost use.

3 years agoboot: ternary op is your friend
Lennart Poettering [Tue, 9 Nov 2021 22:48:37 +0000 (23:48 +0100)] 
boot: ternary op is your friend

3 years agoboot: add comments what closely related ConfigEntry fields are about
Lennart Poettering [Tue, 9 Nov 2021 22:47:45 +0000 (23:47 +0100)] 
boot: add comments what closely related ConfigEntry fields are about

3 years agoscope: count successful cgroup additions when delegating via D-Bus
Jonas Witschel [Wed, 10 Nov 2021 21:46:35 +0000 (22:46 +0100)] 
scope: count successful cgroup additions when delegating via D-Bus

Since commit 8d3e4ac7cd37200d1431411a4b98925a24b7d9b3 ("scope: refuse
activation of scopes if no PIDs to add are left") all "systemd-run --scope
--user" calls fail because cgroup attachments delegated to the system instance
are not counted towards successful additions. Fix this by incrementing the
return value in case unit_attach_pid_to_cgroup_via_bus() succeeds, similar to
what happens when cg_attach() succeeds directly.

Note that this can *not* distinguish the case when
unit_attach_pid_to_cgroup_via_bus() has been run successfully, but all
processes to attach are gone in the meantime, unlike the checks that commit
8d3e4ac7cd37200d1431411a4b98925a24b7d9b3 adds for the system instance. This is
because even though unit_attach_pid_to_cgroup_via_bus() leads to an internal
unit_attach_pids_to_cgroup() call, the return value over D-Bus does not include
the number of successfully attached processes and is always NULL on success.

Fixes: #21297
3 years agoman: remove unintentionally repetitive words
ml [Thu, 11 Nov 2021 09:01:19 +0000 (10:01 +0100)] 
man: remove unintentionally repetitive words

3 years agoMerge pull request #21302 from yuwata/udev-drop-colon-from-ID_NET_NAME_MAC
Lennart Poettering [Thu, 11 Nov 2021 13:36:28 +0000 (14:36 +0100)] 
Merge pull request #21302 from yuwata/udev-drop-colon-from-ID_NET_NAME_MAC

udev: drop colon from ID_NET_NAME_MAC

3 years agoMerge pull request #21304 from poettering/chain-ssh-auth-keys
Lennart Poettering [Thu, 11 Nov 2021 13:35:48 +0000 (14:35 +0100)] 
Merge pull request #21304 from poettering/chain-ssh-auth-keys

userdbctl: add support for chaining other ssh-authorized-keys commands from userdbctl

3 years agoMerge pull request #21301 from yuwata/network-neighbor-use-hw-addr-data
Luca Boccassi [Thu, 11 Nov 2021 10:32:11 +0000 (10:32 +0000)] 
Merge pull request #21301 from yuwata/network-neighbor-use-hw-addr-data

network: neighbor: use "struct hw_addr_data"

3 years agotest: use kbd-mode-map we ship in one more test case
Yu Watanabe [Wed, 10 Nov 2021 23:55:10 +0000 (08:55 +0900)] 
test: use kbd-mode-map we ship in one more test case

Follow-up for be0cc2ce6c947aafadb3f42dba405269f670b31c.

Fixes https://github.com/systemd/systemd/pull/19670#issuecomment-965817823.

3 years agoudev: drop colon from ID_NET_NAME_MAC 21302/head
Yu Watanabe [Thu, 11 Nov 2021 02:56:53 +0000 (11:56 +0900)] 
udev: drop colon from ID_NET_NAME_MAC

Fixes a bug introduced by eaba9bb3e69635d2c490c5e1b0d262b763753e1d.

3 years agoether-addr-util: introduce hw_addr_to_string_full()
Yu Watanabe [Thu, 11 Nov 2021 02:55:04 +0000 (11:55 +0900)] 
ether-addr-util: introduce hw_addr_to_string_full()

3 years agoman: document new --chain switch to userdbctl 21304/head
Lennart Poettering [Thu, 11 Nov 2021 09:04:31 +0000 (10:04 +0100)] 
man: document new --chain switch to userdbctl

And while we are at it, make 'ssh-authorized-keys' verb properly
documented. Given that OpenSSH documents the interface in its man page
it's fine to just document our implementation of it too.

3 years agouserdbctl: add support for chaining command lines in "authorized-keys" verb
Lennart Poettering [Thu, 11 Nov 2021 08:33:39 +0000 (09:33 +0100)] 
userdbctl: add support for chaining command lines in "authorized-keys" verb

3 years agoescape: return unused memory in quote_command_line()
Lennart Poettering [Thu, 11 Nov 2021 08:33:31 +0000 (09:33 +0100)] 
escape: return unused memory in quote_command_line()

3 years agoprocess-util: use quote_command_line() at one more place
Lennart Poettering [Thu, 11 Nov 2021 08:33:10 +0000 (09:33 +0100)] 
process-util: use quote_command_line() at one more place

3 years agoescape: add flags argument to quote_command_line()
Lennart Poettering [Thu, 11 Nov 2021 08:32:32 +0000 (09:32 +0100)] 
escape: add flags argument to quote_command_line()

That way, we can reuse the call at one more place (see later patch).

3 years agonetwork: neighbor: accept an empty string assignment 21301/head
Yu Watanabe [Thu, 11 Nov 2021 00:24:56 +0000 (09:24 +0900)] 
network: neighbor: accept an empty string assignment

3 years agonetwork: neighbor: use "struct hw_addr_data" to store link layer address
Yu Watanabe [Thu, 11 Nov 2021 00:21:59 +0000 (09:21 +0900)] 
network: neighbor: use "struct hw_addr_data" to store link layer address

3 years agoether-addr-util: expose hw_addr_hash_func()
Yu Watanabe [Thu, 11 Nov 2021 00:21:26 +0000 (09:21 +0900)] 
ether-addr-util: expose hw_addr_hash_func()

3 years agosd-netlink: fix type of NDA_LLADDR attribute
Yu Watanabe [Thu, 11 Nov 2021 03:49:25 +0000 (12:49 +0900)] 
sd-netlink: fix type of NDA_LLADDR attribute

3 years agoMerge pull request #21273 from yuwata/hostname-device-tree
Luca Boccassi [Wed, 10 Nov 2021 23:15:20 +0000 (23:15 +0000)] 
Merge pull request #21273 from yuwata/hostname-device-tree

hostnamed: use /proc/device-tree to get chassis type

3 years agonetif-util: fix stack-use-after-scope
Yu Watanabe [Wed, 10 Nov 2021 19:03:02 +0000 (04:03 +0900)] 
netif-util: fix stack-use-after-scope

Fixes a bug introduced by 0295b2fd1d97c68010c7528af13e2952886d52e0.

Fixes #21292.

3 years agoci: take CIFuzz's matrix into consideration
Frantisek Sumsal [Wed, 10 Nov 2021 19:15:41 +0000 (20:15 +0100)] 
ci: take CIFuzz's matrix into consideration

Otherwise the jobs will try to cancel each other out.

Follow-up to 3884837610168e6fb69fc2d5709f6c017a30beb9.

3 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

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

3 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.

3 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

3 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
3 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

3 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

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

3 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.

3 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

3 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.

3 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.

3 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.

3 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

3 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.

3 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

3 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

3 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.

3 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

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

3 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

3 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

3 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

3 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

3 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
3 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.

3 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.

3 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.

3 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.

3 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

3 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

3 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

3 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

3 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.

3 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
3 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

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

3 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()

3 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

3 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()

3 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()

3 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()

3 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()

3 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()

3 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

3 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.

3 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
3 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.

3 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

3 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

3 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
3 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

3 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

3 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

3 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.)

3 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

3 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.

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

3 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

3 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

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

3 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